HTML and CSS Reference
In-Depth Information
Event Attribute
Event Description
onabort
Invoked generally by the cancellation of an image load but may happen
on any communication that aborts (for example, Ajax calls). Abort events
do not have to target the element directly because any abort event that
bubbles through an element can be caught.
Called after a print event. Found only on the body element.
onafterprint
onbeforeprint
Called before a print event. Found only on the body element.
onbeforeunload
Invoked just before a page or object is unloaded from the user agent.
onblur
Occurs when an element loses focus, meaning that the user has moved
focus to another element, typically either by clicking the mouse or by tabbing.
Fires when a media element can be played but not necessarily
continuously for its complete duration without potential buffering.
oncanplay
Fires when a media element can be played and should play its complete
duration uninterrupted.
oncanplaythrough
Signals that the form control has lost user focus and its value has been
modified during its last access.
onchange
Indicates that the element has been clicked.
onclick
oncontextmenu
Called when a context menu is invoked generally by right-click. Can be
fired by direct targeting of the element or the event bubbling up.
ondblclick
Indicates that the element has been double-clicked.
ondrag
Fires as a draggable element is being dragged around the screen.
Occurs at the very end of the drag-and-drop action (should be after ondrag ).
ondragend
ondragenter
Fires when an item being dragged passes on the element with this event
handler—in other words, when the dragged item enters into a drop zone.
ondragleave
Fires when an item being dragged leaves the element with this event
handler—in other words, when the dragged item leaves a potential drop zone.
ondragover
Fires when an object that is being dragged is over some element with this
handler.
ondragstart
Occurs on the very start of a drag-and-drop action.
ondrop
Fires when an object being dragged is released on some drop zone.
Fires when the value indicating the duration of a media element changes.
ondurationchange
onemptied
Fires when a media element goes into an uninitialized or emptied state,
potentially due to some form of a resource reset.
onended
Fires when a media element's playback has ended because the end of the
data resource has been reached.
onerror
Used to capture various events generally related to communication using
Ajax, though may apply to arbitrary URL loading using media elements like
images, audio, and video. This attribute is also used for catching script-
related errors.
T ABLE 3-5 HTML5 Event Preview
 
Search WWH ::




Custom Search