function?stopPropagation(event){
if(event?&&?event.stopPropagation){stopPropagation?=?function(event){event.stopPropagation();};?stopPropagation(event);?return;}
if(window.event?&&?event.stopPropagation){stopPropagation?=?function(event){window.event.stopPropagation();};stopPropagation(event);?return;}
if(event){stopPropagation?=?function(event){event.cancelBubble?=?true;};?stopPropagation(event);?return;}
if(window.event){stopPropagation?=?function(event){window.event.cancelBubble?=?true;};stopPropagation(event);?return;}
}
event.cancelBubble如果最終是在ie7的瀏覽器調(diào)用了這個(gè)方法,那么默認(rèn)event.cancelBubble的值是flase還是true?
本來后面兩個(gè)判斷我是想加上event.cancelBubble
if(event?&&?event.cancelBubble)
if(window.event?&&?window.event.cancelBubble)??
但是看以前寫的冒泡排序上有個(gè)?event.cancelBubble?=?true;??所以想問下??這個(gè)默認(rèn)是不是false
ieTest上試過???但是不知道為啥我的那個(gè)上面明明寫了alert?但是不管怎么樣就不是彈出來
阻止時(shí)間冒泡 ie?
咕咕問
2016-06-24 11:21:54