Ways to stop bubbling

Standard browsers and Internet Explorer 

 w3c's method is event.stopPropagation() proPagation propagation pass

 IE uses event.cancelBubble = true bubble bubbling bubble cancel cancel

 Compatible notation:

if(event && event.stopPropagation)
        {
             event.stopPropagation();   //   w3c standard 
          }
           else
          {
              event.cancelBubble = true ;   // ie 678 ie browser 
 }

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325218272&siteId=291194637