Javascript Event Attributes
Mouse Events
| Attribute | Description | Value |
|---|---|---|
| onmousedown | Runs the script when mouse button is pressed. | Script |
| onmouseup | Runs the script when mouse button is released. | Script |
| onmouseover | Runs the script when mouse is on the object. | Script |
| onmousemove | Runs the script when mouse is moved over the object. | Script |
| onmouseout | Runs the script when mouse is moved out of the object. | Script |
| onclick | Runs the script when mouse is pressed and released. | Script |
| ondblclick | Runs the script when mouse is pressed and released twice. | Script |
Keyboard Events
| Attribute | Description | Value |
|---|---|---|
| onkeydown | Runs the script when a keyboard key is pressed down. | Script |
| onkeyup | Runs the script when a keyboard key is released. | Script |
| onkeypress | Runs the script when a keyboard key is pressed and released. | Script |
Window Events
| Attribute | Description | Value |
|---|---|---|
| onload | Runs the script when window loads. | Script |
| onunload | Runs the script when window unloads. | Script |
Form Events
| Attribute | Description | Value |
|---|---|---|
| onchange | Runs the script when an element changes. | Script |
| onselect | Runs the script when an element is selected. | Script |
| onsubmit | Runs the script when form is submitted. | Script |
| onreset | Runs the script when form is reset. | Script |
| onfocus | Runs the script when an element gains focus. | Script |
| onblur | Runs the script when an element looses focus. | Script |
Back to the html reference and tutorials page.

