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 } }

 

posted @ 2015-01-08 14:45  ICupid  阅读(429)  评论(0编辑  收藏  举报