HTML global event attributes (1+XWeb certificate personal arrangement)

Window window event

onload: Triggered after the page is loaded
onunload: Triggered when the user loads from the page, such as stand-alone jump, page reload, close the browser window, etc.

Form event

onblur: trigger when the element loses focus
onchange: trigger when the value of the element is changed
onfocus: trigger when the element gains focus
onreset: trigger when the expression reset button is clicked
onselect: trigger
onsubmit when the element is selected in the text : Triggered when the form is submitted

Keyboard events

onkeydown: trigger when the user presses the key
onkeypress: trigger when the user presses the key after the key is pressed (this attribute will not take effect for all keys, such as Alt Ctrl Shift Esc)
onkeyup: trigger when the user releases the key

Mouse events

onclick: Triggered when the element is clicked
ondblclick: Triggered when the element is double-clicked
onmousedown: Triggered
when the mouse is pressed down on the element onmousemove: Triggered when the mouse pointer moves to the element
onmouseout: Triggered when the mouse pointer moves out of the element
onmouseover: Trigger
onmouseup when the mouse pointer moves to the element : Triggered when the mouse button is released on the element

Mouse media events

onabort: Triggered when the media player is
exited onwaiting: Triggered when the media has stopped playing but intends to continue playing

Guess you like

Origin blog.csdn.net/qq_44948696/article/details/109730984