The element binding events:
- Event Object Type = .on event handler;
- IE8 does not support object .addEventListener (not on the event type, event handler, false); The third parameter is used to control the bubbling phase of the event or the capture phase
- Google and Firefox do not support the object .attachEvent ( "on" + event type, event handler)
Unbundling event elements:
- Object .on event type = null;
- IE8 does not support object .removeEventListener (not on the event type, event handler, false);
- Google Firefox does not support object .detachEvent ( "on" + event type, event handler);
Event bubbling : when there is a nested relationship of elements, and each element contain the event, when the event triggering the inner, outer events will be triggered.
Stop the event bubbling way :
- window.event.cancelBubble = true; Firefox does not support
- e.stopPropagation (); e is the event parameter object does not support ie8