In the front-end development work, because of browser compatibility issues, we often use "stop event bubbling" and "block browser default behavior."
1. Stop event bubbling
JavaScript code
If an event object is provided, this is a non-ie browser if
(e && e.stoppropagation)
//So it supports the Stoppropagation () method
of the Web E.stoppropagation ();
else
//Otherwise, we need to use IE to cancel event bubbling
window.event.cancelBubble = true;
return false;
2. Block browser default behavior
JavaScript code
If an event object is provided, this is a non IE browser if
(e && e.preventdefault)
//block default browser action (web)
e.preventdefault ();
Else
//ie the way in which the default action of the function is blocked
Window.event.returnValue = false;
return false;
Transfer from (http://www.cnblogs.com/yuzhongwusan/archive/2008/12/27/1363417.html)