js处理事件冒泡(兼容写法)

event = event || window.event;
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
posted @ 2019-02-18 13:18  入坑的H  阅读(923)  评论(0编辑  收藏  举报