Javascript 对象仅在IE中出现预期错误
我一直在IE中获得预期的对象。这是Javascript代码,我认为问题在于:Javascript 对象仅在IE中出现预期错误,javascript,jquery,css,internet-explorer,Javascript,Jquery,Css,Internet Explorer,我一直在IE中获得预期的对象。这是Javascript代码,我认为问题在于: $('#rv-sidebar-decline-all').click(function () { PageModuleContext.sendMessage("declineAll", null, this.handleMessage); 这是它的CSS #rv-sidebar-decline-all { cursor : default; height
$('#rv-sidebar-decline-all').click(function () {
PageModuleContext.sendMessage("declineAll", null, this.handleMessage);
这是它的CSS
#rv-sidebar-decline-all {
cursor : default;
height : 8px;
width : 8px;
background-position : left top;
background-image : url({{:declineAll}});
}
基本上,一旦点击了背景图像,事件就应该发生。我得到一个弹出窗口,上面写着预期的对象,但如果我想继续运行脚本。当我在弹出窗口中单击“是”时,随后会发生事件。sendMessage函数的代码是什么?@RoryMcCrossan可能发现您传递的
null
看起来可疑。此.handleMessage
也会引起问题this
的作用域是jQuery,而不是调用click
方法的方法。但是“this”在Chrome和Firefox上运行良好,不幸的是,由于安全原因,我无法发布sendMessage函数@KJPrice