原理
时间冒泡由内而外,向外迸发,为了阻止无谓的事件发生,所以阻止事件冒泡
方法一
$("#div1").mousedown(function(event){
event.stopPropagation();
});
方法二
$("#div1").mousedown(function(event){
return false;
});
时间冒泡由内而外,向外迸发,为了阻止无谓的事件发生,所以阻止事件冒泡
$("#div1").mousedown(function(event){
event.stopPropagation();
});
$("#div1").mousedown(function(event){
return false;
});