HTML and CSS Reference
In-Depth Information
Form Events
The following list of event attributes applies to either an entire Web form or fi elds within
a form.
Attribute
Description
onblur
The form field has lost the focus.
onchange
The value of the form field has been changed.
onfocus
The form field has received the focus.
onformchange
The user made a change in the value of a form field in the form (HTML5)
onforminput
The value of a control in the form changes (HTML5)
oninput
The value of an element changes (HTML5)
oninvalid
The form field fails to meet validity constraints (HTML5)
onreset
The form has been reset.
onselect
Text content has been selected in the form field.
onsubmit
The form has been submitted for processing.
Drag and Drop Events
The following list of event attributes applies to all page elements and can be used to
respond to the user action of dragging and dropping objects in the Web page.
Attribute
Description
ondrag
The user continues to drag the element (HTML5)
ondragenter
The user ends dragging the element, entering the element into a valid drop
target (HTML5)
ondragleave
The user's drag operation leaves the element (HTML5)
ondragover
The user continues a drag operation over the element (HTML5)
ondragstart
The user starts dragging the element (HTML5)
ondrop
The user completes a drop operation over the element (HTML5)
Multimedia Events
The following list of event attributes applies to embedded multimedia elements such as
audio and video clips and is used to respond to events initiated during the loading or
playback of those elements.
Attribute
Description
oncanplay
The browser can resume playback of the video or audio, but determines the
playback will have to stop for further buffering
oncanplaythrough
The browser can resume playback of the video or audio, and determines the
playback can play through without further buffering (HTML5)
ondurationchange
The DOM duration of the video or audio element changes (HTML5)
onemptied
The video or audio element returns to the uninitialized state (HTML5)
onended
The end of the video or audio is reached (HTML5)
onloadeddata
The video or audio is at the current playback position for the first time (HTML5)
 
Search WWH ::




Custom Search