使用 JavaScript 获取和设置剪贴板
我看到一些线程解释 Flash 可用于在 Mozilla 和 Internet Explorer 中设置剪贴板数据,这很简单,等等。
例如 Greasemonkey\JavaScript 复制到剪贴板按钮
但是,我想在设置之前读取剪贴板并删除某些项目。有什么办法可以做到这一点吗?
那么..是否可以检测是否发生复制和粘贴?然后将它们重定向到另一个 URL?
I have seen a few threads explaining that Flash can be used to set the clipboard data in Mozilla and Internet Explorer, it's easy, etc.
For example Greasemonkey\JavaScript Copy to Clipboard button
However, I would like to read the clipboard and remove certain items before setting it. Is there any way to do this?
So.. Is it possible then to detect whether copying and pasting is occuring? Then redirect them to another URL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
读取剪贴板是一个相当大的安全问题。即使你能做到,这也不是一种友好的策略,我建议你不要这样做,特别是如果你打算改变它的话。
Reading the clipboard is a pretty big security issue. Even if you can do it, it's not considered a friendly tactic, and I would advise against it, especially if you plan on changing it.