Events are action that can be detected by JavaScript. Every element on a web page has certain events which can trigger a javascript.
Mouse Event | Description |
---|---|
Mouse Event | Description |
onclick | This event occurs when the user clicks on an any element. |
ondblclick | This event occurs when the user double-clicks on an any element. |
onmouseenter | This event occurs when the mouse pointer moves onto an element. |
onmouseleave | This event occurs when the mouse pointer moves out of an element. |
onmouseover | This event occurs when the mouse pointer is moved onto an element or its children. |
onmouseout | This event occurs when the mouse pointer is moved out of an element or its children. |
onmouseup | This event occurs when the user releases a mouse button while over an element. |
onmousedown | This event occurs when the user presses a mouse button over an element. |
onmousemove | This event occurs when the mouse pointer is moving while it is over an element. |
oncontextmenu | This event occurs when the user right-clicks on an element to open a context menu. |
Keyboard Event | Description |
onkeyup | This event occurs when the user releases a key. |
onkeydown | This event occurs when the user is pressing a key down. |
onkeypress | This event occurs when the user presses a key on the keyboard. |
Form Event | Description |
onblur | This event occurs when the user releases a key. |
onchange | This event occurs when the user is pressing a key down. |
onfocus | This event occurs when the element gets focus. |
onfocusin | This event occurs when an element is about to get focus. |
onfocusout | This event occurs when the element is about to lose focus. |
oninput | This event occurs when the user input on an element. |
onsearch | |
onselect | |
onsubmit | |
onreset | |
oninvalid |