HTML Form Events
suggest changeEvents triggered by actions inside an HTML form (many of these apply to almost all HTML elements, but they are most often used on form elements):
Attribute | Description |
—— | —— |
onblur | Fires the moment that the element loses focus |
onchange | Fires the moment when the value of the element is changed |
oncontextmenu | Script to be run when a context menu is triggered |
onfocus | Fires the moment when the element gets focus |
oninput | Script to be run when an element gets user input |
oninvalid | Script to be run when an element is invalid |
onreset | Fires when the Reset button in a form is clicked |
onsearch | Fires when the user types in a search field (<input type="search">). Not all browsers fire this event. |
onselect | Fires after some text has been selected in an element |
onsubmit | Fires when a form is submitted |