box.onclick = function (event) {
event = event || window.event;
if (event && event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
}
box.onclick = function (event) {
event = event || window.event;
if (event && event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
}
本文标题:阻止事件冒泡
本文链接:https://www.haomeiwen.com/subject/ebrdyxtx.html
网友评论