首页 > 代码库 > js 阻止冒泡 兼容性方法

js 阻止冒泡 兼容性方法

function  customstopPropagation(e){        var ev = e || window.event;        if (ev.stopPropagation) {            ev.stopPropagation();
 $(document).on("click",".add",function(e){//阻止冒泡customstopPropagation(e);})

  

} else if (window.event) {//IE window.event.cancelBubble = true;//IE } }

 

js 阻止冒泡 兼容性方法