HTML and CSS Reference
In-Depth Information
Event Attribute
Event Description
onfocus
Indicates that an element has received focus; namely, it has been
selected for manipulation or data entry.
onformchange
Fires when any element of the form changes.
onforminput
Fires when input is made in a form element.
Fires when the URL's hash identifier value changes. Changing this value is
commonly performed in Ajax applications to indicate a state change and
support browser back-button activity.
onhashchange
oninput
Fires when input is made to form elements.
Fires when a form field is specified as invalid according to validation rules
set via HTML5 attributes such as pattern , min , and max .
oninvalid
Indicates that a key is being pressed down with focus on the element.
onkeydown
onkeypress
Describes the event of a key being pressed and released with focus on
the element.
onkeyup
Indicates that a key is being released with focus on the element.
onload
Indicates the event of a window or frame set finishing the loading of a
document.
onloadeddata
Fires when the user agent can play back the media data at the current
play position for the first time.
Fires when the user agent has the media's metadata describing the
media's characteristics.
onloadedmetadata
Fires when the user agent begins to fetch media data, which may include
the initial metadata.
onloadstart
Fires when a message hits an element. HTML5 defines a message
passing system between client and server as well as between documents
that this handler can monitor.
onmessage
Indicates the press of a mouse button with focus on the element.
onmousedown
onmousemove
Indicates that the mouse has moved while over the element.
onmouseout
Indicates that the mouse has moved away from an element.
onmouseover
Indicates that the mouse has moved over an element.
Indicates the release of a mouse button with focus on the element.
onmouseup
onmousewheel
Fires when the mouse wheel is used on the element or bubbles up from
some descendent element.
onoffline
Fires when the user agent goes offline. Found only on the body element.
ononline
Fires when the user agent goes back online. Found only on the body
element.
onpagehide
Fires when a page is suspended though not necessarily fully unloaded.
T ABLE 3-5 HTML5 Event Preview (continued)
 
Search WWH ::




Custom Search