本人现在用的代码是:if (event.stopPropagation) {
event.stopPropagation();
}else if (window.event) {
window.event.cancelBubble = true;
}
1 回答
轩儿news
TA贡献3条经验 获得超2个赞
找到方法了!累死姥姥了~~~兼容所有浏览器(消除冒泡事件)
function stopEvent(){
var e=arguments.callee.caller.arguments[0]||event;
if ( e && e.stopPropagation ) {
e.stopPropagation();
} else{
window.event.cancelBubble = true;
}
}
添加回答
举报
0/150
提交
取消