function cancelEvent(evt){
if (window.event) {
window.event.cancelBubble =true;
}else{
evt.stopPropagation();
}
}
event在firefox浏览器中是局部变量,所以必须要通过参数的方式传递到相应的方法中。
转载于:https://www.cnblogs.com/yumianhu/archive/2013/06/13/3710747.html