A.2. Event Attributes

The following section lists those attributes relevant to providing script hooks for responding to events such as page loading and mouse movement.

A.2.1. Standard Events

The standard event attributes that are supported by most elements:

AttributeTriggered By
onclickPointer button was clicked.
ondblclickPointer button was double clicked.
onmousedownPointer button was pressed down.
onmouseupPointer button was released.
onmouseoverPointer was moved into.
onmousemovePointer was moved within.
onmouseoutPointer was moved away.
onkeypressKey was pressed and released.
onkeydownKey was pressed.
onkeyupKey was released.

A.2.2. Other Events

Less-common event attributes:

AttributeTriggered By
onloadDocument has been loaded.
onunloadDocument has been removed.
onblurElement lost focus.
onfocusElement gained focus.
onresetForm was reset.
onsubmitForm was submitted.
onchangeForm element value changed.
onselectText in a form field has been selected.

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.