[英]Jquery Script not working in Internet Explorer
I have this script working fine in Chrome but in IE 8 or 9, this code is not working: 我的脚本在Chrome中工作正常,但在IE 8或9中,此代码无法正常工作:
$(document).on("mousedown", '#CentroCusto_new option', function (event) {
debugger;
alert('oi');
event.returnValue = false;
this.selected = !this.selected;
event.preventDefault();
});
How to solve this? 如何解决呢? I think IE is not accepting this selector, but why? 我认为IE不接受此选择器,但是为什么呢?
debugger;
is pausing execution of your code - which is why alert()
isn't firing 正在暂停执行您的代码-这就是为什么alert()
不触发的原因
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.