我想下面的代码在除了IE(每版)的所有浏览器上运行。运行特定的jQuery代码?
$('#divid a').click(function(e) {
e.preventDefault();
});
我尝试了一些来自Stack的东西,但没有成功。
喜欢:
<![if ! IE]>
<script>
$('#divid a').click(function(e) {
e.preventDefault();
});
</script>
<![endif]>
看看这个问题=> http://stackoverflow.com/questions/19999388/jquery-check-if-user-is-using-ie – 2014-09-30 20:38:44
为什么你需要这个不能在IE中运行?是因为你想为IE做一些特殊的事情,还是仅仅因为IE不支持这个功能呢?如果是后者,那么你就错了。 – 2014-09-30 21:02:12