开发者

jQuery: triggering paste?

开发者 https://www.devze.com 2023-02-22 14:05 出处:网络
Is there any way开发者_JS百科 to trigger a paste in jQuery? Or maybe a broader question: is there any cross-browser way to trigger a paste with Javascript at all?Getting data from the user\'s clipboa

Is there any way开发者_JS百科 to trigger a paste in jQuery?

Or maybe a broader question: is there any cross-browser way to trigger a paste with Javascript at all?


Getting data from the user's clipboard is a pretty big security risk (for the user). Zero Clipboard will get you part of the way there (requires Flash), although it will only let you mimic paste using what you've copied using their library.

http://code.google.com/p/zeroclipboard/

You won't find a cross-browser JavaScript or jQuery only solution, though.


You cannot trigger a cut, copy or paste programmatically in JavaScript and still maintain cross browser support. These actions can only come from the user.

0

精彩评论

暂无评论...
验证码 换一张
取 消