在 IE8 中使用 ActiveX 时剪贴板复制粘贴错误
我正在开发一个 ActiveX 工具,允许用户将数据复制到系统剪贴板中。 然后,用户可以将数据粘贴到记事本或类似的东西中。
它在 IE6 和 IE7 上运行良好。
然而,对于 IE8,我们收到错误:“无法打开剪贴板”。 错误号是:20027
已尝试以下操作,但没有帮助: 1. 启用所有 IE 选项。 2. 在 IE“受信任站点”中添加和删除站点。 3.IE8兼容模式。
更糟糕的是,我还没有找到任何网站谈论为什么会发生此错误。 它似乎确实是保护通用 IE 用户的“功能”..但我想知道它的详细信息,以便我可以找到解决方法。
如果您知道此问题的原因是什么,或者可能的解决方案是什么,这将会有很大的帮助。
谢谢!
I am working on an ActiveX tool that allows users to copy data from it into the system clipboard.
The user would then be able to paste data in to Notepad or something like that.
It works fine with IE6 and IE7.
However with IE8 we are getting an error: "Unable to Open Clipboard".
Error number is: 20027
Following things were tried, but did not help:
1. Enabled all IE Options.
2. Added and removed site from IE "trusted sites".
3. IE8 compatibility mode.
What's worse is that I haven't found any site that talks about why this error is occurring.
It does seem to be 'feature' to protect generic IE user.. but I would like to know its details, so that I can find a workaround.
If you have any idea about what the cause this problem is, or what its possible solution might be, it will be of great help.
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web 浏览器已允许自行复制到剪贴板,并在需要时向用户发出提示。
如何在 JavaScript 中复制到剪贴板?
由于您使用的是 ActiveX 控件,因此您已经仅限于 IE,这使操作变得很容易。
至于 IE8 保护模式,请参阅 What's new in IE8 和 使用保护模式文章。
Web browsers already allow copying to the clipbord themselves with a prompt to the user if required.
How do I copy to the clipboard in JavaScript?
Seeing as you're using an ActiveX control, you're alreayd limited to IE which makes it easy.
As for IE8 protected mode, see the What's new in IE8 and working with protected mode articles.