玩笑过后

导航

取消冒泡机制的兼容写法

function stopBubble(e){
        if (e.stopPropagation)
        {
            e.stopPropagation();
        }else {
            e.cancelBubble = true;
        }
    }
e.stopPropagation();//w3c标准下
e.cancelBubble = true;//IE9

posted on 2018-07-22 18:30  玩笑过后  阅读(97)  评论(0编辑  收藏  举报