标签:callee cal 冒泡 eve har 不兼容 else rip arguments
JavaScript 兼容各大浏览器阻止冒泡事件
function stopEvent(event) { //阻止冒泡事件 //取消事件冒泡 var e = arguments.callee.caller.arguments[0] || event; //若省略此句,下面的e改为event,IE运行可以,但是其他浏览器就不兼容 if (e && e.stopPropagation) { // this code is for Mozilla and Opera e.stopPropagation(); } else if (window.event) { // this code is for IE window.event.cancelBubble = true; } }
标签:callee cal 冒泡 eve har 不兼容 else rip arguments
原文地址:http://www.cnblogs.com/yz-blog/p/7889209.html