开发者社区 问答 正文

IE8下不支持jquery绑定的click事件怎么破

$('#div').on('click',function(){
    doSomething();
})
<div id="div"></div>   

展开
收起
杨冬芳 2016-06-17 13:45:07 2872 分享 版权
1 条回答
写回答
取消 提交回答
  • IT从业

    楼主不说明使用版本,猜测可能是版本的问题。

    复制一段 jQuery 官网的原话:

    jQuery 2.x has the same API as jQuery 1.x, but does not support
    Internet Explorer 6, 7, or 8.

    2.x 版本不兼容 IE6,7,8

    2019-07-17 19:42:34
    赞同 展开评论