yikai.shao Backend Dev Engineer

js阻止冒泡排序

2018-04-03
js

代码如下:


var e = event || window.event;
if (e.stopPropagation) {
    //W3C阻止冒泡方法
    e.stopPropagation();
} else {
    //IE阻止冒泡方法
    e.cancelBubble = true;
}


下一篇

概要