(1) 阻止默认事件

function(e){

if(e && e.preventDefault){

e.preventDefault();

}else{ //IE

window.event.returnValue = false;

}

}

(2) 阻止冒泡事件

function(e){

if(e && e.stopPropagation){

e.stopPropagation();

}else{ //IE

window.event.cancleBubble = true;

}

}

05-20 04:09