The concept of JavaScript events
The so-called event means that JavaScript captures the user's operation and makes the correct response. For example, the user clicks the mouse to pop up a window, and moves the mouse to an element to cause changes.
JavaScript events are generally bound to DOM elements.
The basic mechanism of JavaScript event processing:
1. Bind event processing functions to DOM elements;
2. Monitor user operations;
3 .When the user performs an operation corresponding to the bound event on the corresponding DOM element, the event processing function responds;
4. Update the processing results to the HTML document.