标签: javascript
document有execCommand函数,其中有copy属性:
document
execCommand
copy
DBFiddle DEMO
但我想复制一个特殊的文字,我怎么能意识到它?
如:
var text = "abc123" document.execCommand('copy', xxx) // or whatever to copy the text to the clipboard.