阻止冒泡事件即可
//jquery $("#btn").click(function(event){ event.stopPropagation();//阻止事件冒泡即可 }); //js document.getElementById("btn").onclick=function(event){ event.stopPropagation();//阻止事件冒泡即可 }
html 点击子元素事件而不触发父元素的点击事件
原文:https://www.cnblogs.com/dch0/p/12091661.html