Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
工作流程很简单:
你怎么做呢?
就浏览器兼容性而言,在 Javascript 中复制到剪贴板是一项棘手的任务。最好的方法是使用小闪光灯。它适用于所有浏览器。你可以在这篇文章中查看。
以下是 Internet Explorer 的操作方法:
function copy (str) { //for IE ONLY! window.clipboardData.setData('Text',str); }