问题
Possible Duplicate:
Copy to clipboard without Flash
I want to copy some text from an element by a given id to clipboard. I want to be flashless solution, no Flash at all. It can be in jQuery or JavaScript.
The solution for IE is simple (clipboardData), but for FF, Chrome and others - it doesn't work.
Help.
回答1:
There is no javascript method to do this - its prevented by browser security ... Flash is the best alternative ...
Explanation of security policy on Firefox -> http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
来源:https://stackoverflow.com/questions/8742559/copy-to-clipboard-with-no-flash-firefox-chrome-safari-opera