IE9 上的 ThumbBarButton
我正在尝试使用 document.addEventListener('msthumbnailclick', processSelection, false);
方法将事件附加到按钮,但我给了我一个错误
“对象不支持此属性 或方法”
我尝试了 document.attachEvent
但它不起作用,看起来它并没有真正将函数附加到事件
任何帮助?!
i am trying to use the document.addEventListener('msthumbnailclick', processSelection, false);
method to attach the event to the buttons but i gives me an error
"Object doesn't support this property
or method"
i tried document.attachEvent
but it's not working, looks like it doesn't really attach the function to the event
any help ?!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最近也遇到了同样的问题。浏览器模式设置为 IE9,但文档模式设置为 IE7 标准。在这种情况下,document.addEventListener 将是未定义的。
要使用 document.addEventListener,您需要确保将文档模式设置为 IE9 标准。
如果尚未设置,请按 F12 并手动设置。
问候
I had the same problem recently. The Browser Mode was set to IE9 but the Document Mode was set to IE7 Standars. In that case document.addEventListener will be undefined.
To use document.addEventListener you need to be sure to set the Document Mode to IE9 Standards.
Press F12 and set it by hand if not already set.
Regards