Stop the event bubbling, click the child does not respond to the parent element

Stop event bubbling;

Who would not want to put anyone inside the bubble

can use

return false; 

may also be used
the stopPropagation (); 
need to pass a parameter such as:
$ ( "Son.") the Click (function (E) {. 
Alert ( "Son hello");
e.stopPropagation ();
});

but when I do start point home, use return false does not work;
stopPropagation ( ); can be achieved;
I do not know how it happened;

Guess you like

Origin www.cnblogs.com/duokexiao/p/11294816.html
Recommended