stopPropagation在Firefox下有效
复制代码 代码如下:
functiondoSomething(obj,evt){
alert(obj.id);
vare=(evt)?evt:window.event;
if(window.event){
e.cancelBubble=true;
}else{
//e.preventDefault();
e.stopPropagation();
}
}
Thisisparent1div.
Thisischild1.
Thisisparent1div.
Thisischild1.
Thisisparent1div.
Thisisparent2div. Thisischild2.Willbubble.
Thisisparent2div.