Javascript: Copy to Clipboard onkeydown
I know this is a kinda difficult task,
I already found that neat solution:
http://beckelman.net/post/2009/01/22/Copy-to-Clipboard-with-ZeroClipboard-Flash-10-and-jQuery.aspx
But it seems to require the user to click with the mouse.
Thats not good for what I've in mind:
There is a Site containing some dynamic content. My Javascript split()'s it's content by ; and returns an array. I want the script to copy the first entry onload and everytime the user press Control V (Paste) it shall copy the next entry (of course, it shall still paste!)
Some really simple stuff, but it seems hard to code.
Further: what I dont like with this 开发者_开发百科(beckelman.net) script, too, is the fact it needs a framwork. But I would survive if there is no other solution.
The script should work in IE, but it would be nice if it works with FF, too.
Help please!
Thx in advance!!
I have copied to the clipboard using the following within IE, doesn't work in any other browser as far as I know. It will prompt IE to ask the user if they wish to allow the site to work with the clipboard.
window.clipboardData.setData('Text', 'Your Text');
精彩评论