1. JS events are usually used in combination with functions, so that the execution of functions can be driven by events that occur, causing different effects in html.
2. Attributes (when the properties of these events occur, the function{} will be triggered):
1) onabort: When the image loading is interrupted, a function in the function will be triggered.
2) onbur: When the element loses focus;
3) onfocus: When the element gets focus
4) onclick: Click an object with the mouse
5) ondbclick: Double-click an object with the mouse
6)onerror: An error occurred when loading a document or image
7) onchange: When the user changes the content of the domain (onchange event is often used in combination with the verification of the input field, the commonly used language form verifies whether the format of the ID card, email registration, login, area code, etc. is correct)
8) onkeydown: The key of a keyboard is pressed
9) onkeypress: The key of a keyboard is pressed or held down
10) onkeyup: The key of a keyboard is released
11) onload: A page or image is loaded
12) onmousedown: A mouse button is pressed (onmousedown, onmouseup and onclick constitute all parts of the mouse click event. First, when the mouse button is clicked, the onmousedown event is triggered, when the mouse button is released, the onmouseup event is triggered, and finally, when the mouse click is completed, the onclick event is triggered.)
13) onmousemove: The mouse is moved
14) onmouseout: Mouse is removed from an element
15) onmouseover: The mouse is moved to an element
16) onmouseup: A mouse button is released (difference onkeyup)
17) onreset: Reset button is clicked
18) onresize: The window or frame is resized
19) onselect: Text is selected
20) onsubmit: Submit button is clicked
21) onunload: User exit page
The above is the entire content of the javascript event (event) attributes summarized in this article. Some of the knowledge points I have summarized. If there are any omissions, please correct them and make progress together.