Event Attribute | Event Description | Allowed Elements Under |
---|---|---|
onblur | Occurs when an element loses focus, meaning that the user has activated another element, typically either by clicking the other element | <a>, <area>, <button>, <input>, <label>, <select>, <textarea> |
onchange | Signals that the form field has lost user focus and its value has been modified during this | <input>, <select>, <textarea> |
onclick | Indicates that the element has been clicked. | Most display elements* |
ondblclick | Indicates that the element has been | Most display elements* |
onfocus | Indicates that the element has received focus; in other words, it has been selected by the user for manipulation or data entry. | <a>, <area>, <button>, <input>, <label>, <select>, <textarea> |
onkeydown | Indicates that a key is being pressed down with focus on the element. | Most display elements* |
onkeypress | Indicates that a key has been pressed and released with focus on the element. | Most display elements* |
onkeyup | Indicates that a key is being released with focus on the element. | Most display elements* |
onload | Indicates that the object (typically a window or frame set) has finished loading into the browser. | <body>, <frameset> |
onmousedown | Indicates the press of a mouse button with focus on the element. | Most display elements* |
onmousemove | Indicates that the mouse has moved while over the element. | Most display elements* |
onmouseout | Indicates that the mouse has moved away from | Most display elements* |
onmouseover | Indicates that the mouse has moved over | Most display elements* |
onmouseup | Indicates the release of a mouse button with focus on the element. | Most display elements* |
onreset | Indicates that the form is being reset, possibly by the press of a reset button. | <form> |
onselect | Indicates the selection of text by the user, typically by highlighting it with the mouse. | <input>, <textarea> |
onsubmit | Indicates that the form is about to be submitted, generally the result of activating a Submit button. | <form> |
onunload | Indicates that the browser is navigating away from the current document, and unloading it from the window or frame. | <body>, <frameset> |