◄► JavaScript Events ◄►

Having a good understanding of the range of events is something that's important to me - so I'm noting the main ones on this page.

Event name Type of event Description Links
onkeyup keyboard Occurs when any key from the keyboard is released. This works for all keys on the keyboard. Learn More
onkeydown keyboard Occurs when any key from the keyboard is released. This works for all keys on the keyboard. Learn More
onkeypress keyboard Occurs when the character is being typed from the keyboard. It doesn't work for alt, ctrl, esc, arrow keys, shift keys and similar. Learn More
onload Object Occurs when an object has been loaded. For example, when the page is loaded, execute code. Learn More
onscroll Object Occurs when an element's scrollbar is being scrolled. Learn More
onchange Form Occurs when the value of an element has been changed. It will work for radio buttons and checkboxes. Learn more
onfocus Form Occurs when a visitor focuses on an element. Most used with "input", "select" and "a" elements. Learn More
onreset Form Occurs when a form is reset. When a form is reset, all controls within the form are set to their initial values. Learn More
onselect Form Occurs after some text has been selected in an element. It is used on "input type='text'" or "textarea" elements Learn More
onsubmit Form Occurs when a form is submitted. It only works for buttons. Learn More
onclick Mouse Occurs when we click on an element. Learn More
ondblclick Mouse Occurs when we double-click on an element. Learn More
onmouseout Mouse Occurs when the mouse pointer is moved out of an element, or out of one of its children. Learn More
onmouseover Mouse Occurs when the mouse pointer is moved onto an element, or onto one of its children. Learn More