Introduction to Event.preventdefault () usage
This method notifies the Web browser not to perform the default action associated with the event (if such an action exists). For example, if the type attribute is "submit", any event handle can be called at any stage of event propagation, and by calling the method, you can prevent the form from being submitted. Note that if the Cancelable property of the Event object is Fasle, there is no default action, or the default action cannot be blocked. In either case, calling the method has no effect.
This method notifies the Web browser not to perform the default action associated with the event (if such an action exists).
For example, if the type attribute is "submit", any event handle can be called at any stage of event propagation, and by calling the method, you can prevent the form from being submitted.
Note that if the cancelable (www.111cn.net) property of the Event object is Fasle, there is no default action, or the default action cannot be blocked. In either case, calling the method has no effect.
Introduction to Event.stoppropagation () usage
This method stops the propagation of the event and prevents it from being dispatched to other Document nodes. It can be called at any stage of event propagation. Note that although this method does not prevent other event handles on the same Document node from being called, it can prevent events from being dispatched to other nodes
This method stops the propagation of the event and prevents it from being dispatched to other Document nodes. It can be called at any stage of event propagation.
Note: Although this method does not prevent other event handles on the same Document node from being called, it can prevent events from being dispatched to other nodes.
Event is a DOM method of events, so it is not used alone, such as specifying DOM
From:http://www.111cn.net/wy/js-ajax/47345.htm
JS Event Event.preventdefault () and (www.111cn.net) event.stoppropagation () Usage differences