解决办法:event.stopPropagation(); 加重子节点的触发事件权重。
<div onclick="showFather();" style="width: 100px;height: 100px;background: red">
<span onclick="showSon();" style="width: 50px;height: 50px;background: #fff">冒个泡</span>
</div>
<div onclick="showFather();" style="width: 100px;height: 100px;background: green">
<span onclick="showDisSon();" style="width: 50px;height: 50px;background: #fff">禁止冒泡</span>
</div>
<script>
function showFather(){
alert("父节点");
}
function showSon(){
alert("冒个泡子节点");
}
function showDisSon(){
event.stopPropagation();
alert("禁止冒泡子节点");
}
</script>