function stopPropagation(e){
e = e || window.event;
if(e.stopPropagation){//W3C阻止冒泡的方法
e.stopPropagation();
}else{
e.cancelBubble = true;//IE阻止冒泡的方法
}
document.getElementById("need_hide").onclick = function(e){
stopPropagation(e);
}
}
JavaScript阻止冒泡函数
最新推荐文章于 2020-04-19 15:13:50 发布