阻止冒泡事件即可
//jquery
$("#btn").click(function(event){
event.stopPropagation();//阻止事件冒泡即可
});
//js
document.getElementById("btn").onclick=function(event){
event.stopPropagation();//阻止事件冒泡即可
}
阻止冒泡事件即可
//jquery
$("#btn").click(function(event){
event.stopPropagation();//阻止事件冒泡即可
});
//js
document.getElementById("btn").onclick=function(event){
event.stopPropagation();//阻止事件冒泡即可
}