onclick event
click event
ondbclick event
double click event
onload event
This method is called first when the page starts to load. This method can only be written in the <body> tag. The
onchange event
is triggered when the content changes. It can be used for objects such as text boxes and list boxes. This event is generally used to respond to other changes caused by the user modifying the content.
Description: When the user enters text into a text box, the onchange event will not be triggered. The event will only be triggered when the user clicks the area outside the text box after the user's input is completed, causing the text box to lose focus. If it is a drop-down box, then Triggered when the selection ends.
onblur event and onfocus event The
onblur event is triggered when the current element loses focus. Corresponding to the onfocus event: get the focus event
onscroll event
window scroll event: call the function when the page scrolls. This event is written outside the method, and the function name is not followed by parentheses, such as window.onscroll=move
functionmove() {
alert("Called when the page is scrolled");
}
window.onscroll = move; mouse
related events
onmousemove
When an object is above the scope, the event is triggered to call the function. Note: In the same area, an event is triggered as long as the mouse is moved once.
onmouseout
When the mouse leaves the scope of an object, an event is triggered to call the function.
onmouseover
When the mouse moves over the range of an object, an event is triggered to call the function. Note: In the same area, no matter how you move, the function will only be triggered once.
onmouseup
fires the event when the mouse is released
onmousedown fires the event
when the mouse is pressed
JS common events of Java script
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324608316&siteId=291194637
Recommended
Ranking