IT. Expert System.

HTML

Event Attributes


Event Attributes

The events listed in the tables below are are supported by almost all HTML5 tags.

Window Event Attributes

The following table lists events triggered for the window object. These events apply to the <body> tag:

Attribute Value Description
onafterprint script Executes script after the document is printed
onbeforeprint script Executes script before the document is printed
onbeforeonload script Executes script before the document loads
onblur script Executes script when the window loses focus
onerror script Executes script when an error occur
onfocus script Executes script when the window gets focus
onhaschange script Executes script when the document has change
onload script Executes script when the document loads
onmessage script Executes script when the message is triggered
onoffline script Executes script when the document goes offline
ononline script Executes script when the document comes online
onpagehide script Executes script when the window is hidden
onpageshow script Executes script when the window becomes visible
onpopstate script Executes script when the window's history changes
onredo script Executes script when the document performs a redo
onresize script Executes script when the window is resized
onstorage script Executes script when a document loads
onundo script Executes script when a document performs an undo
onunload script Executes script when the user leaves the document

Form Events

The following table lists events triggered by actions inside a HTML form. These events apply to all HTML5 elements:

Attribute Value Description
onblur script Executes script when an element loses focus
onchange script Executes script when an element changes
oncontextmenu script Executes script when a context menu is triggered
onfocus script Executes script when an element gets focus
onformchange script Executes script when a form changes
onforminput script Executes script when a form gets user input
oninput script Executes script when an element gets user input
oninvalid script Executes script when an element is invalid
onreset script Executes script when a form is reset
HTML4: supported in html4.01
HTML5: not supported in html5
onselect script Executes script when an element is selected
onsubmit script Executes script when a form is submitted

Keyboard Events

The following table lists events triggered by a keyboard. These events apply to all HTML5 elements:

Attribute Value Description
onkeydown script  Executes script when a key is pressed
onkeypress script  Executes script when a key is pressed and released
onkeyup script  Executes script when a key is released

Mouse Events

The following table lists events triggered by a mouse, or similar user actions. These events apply to all HTML5 elements:

Attribute Value Description
onclick script  Executes script on a mouse click
ondblclick script  Executes script on a mouse double-click
ondrag script Executes script when an element is dragged
ondragend script Executes script at the end of a drag operation
ondragenter script Executes script when an element has been dragged to a valid drop target
ondragleave script Executes script when an element leaves a valid drop target
ondragover script Executes script when an element is being dragged over a valid drop target
ondragstart script Executes script at the start of a drag operation
ondrop script Executes script when dragged element is being dropped
onmousedown script  Executes script when a mouse button is pressed
onmousemove script  Executes script when the mouse pointer moves
onmouseout script Executes script when the mouse pointer moves out of an element
onmouseover script Executes script when the mouse pointer moves over an element
onmouseup script  Executes script when a mouse button is released
onmousewheel script Executes script when the mouse wheel is being rotated
onscroll script Executes script when an element's scrollbar is being scrolled

Media Events

The following table lists events triggered by videos, images, and audio. These events apply to all HTML5 elements:

Attribute Value Description
onabort script Executes script on an abort event
oncanplay script Executes script when media can start play, but might has to stop for buffering
oncanplay
through
script Executes script when media can be played to the end, without stopping for buffering
onduration
change
script Executes script when the length of the media is changed
onemptied script Executes script when a media resource element suddenly becomes empty (network errors, errors on load etc.)
onended script Executes script when media has reach the end
onerror script Executes script when an error occurs during the loading of an element
onloadeddata script Executes script when media data is loaded
onloaded
metadata
script Executes script when the duration and other media data of a media element is loaded
onloadstart script Executes script when the browser starts to load the media data
onpause script Executes script when media data is paused
onplay script Executes script when media data is going to start playing
onplaying script Executes script when media data has start playing
onprogress script Executes script when the browser is fetching the media data
onratechange script Executes script when the media data's playing rate has changed
onreadystate
change
script Executes script when the ready-state changes
onseeked script Executes script when a media element's seeking attribute is no longer true, and the seeking has ended
onseeking script Executes script when a media element's seeking attribute is true, and the seeking has begun
onstalled script Executes script when there is an error in fetching media data (stalled)
onsuspend script Executes script when the browser has been fetching media data, but stopped before the entire media file was fetched
ontimeupdate script Executes script when media changes its playing position
onvolume
change
script Executes script when media changes the volume, also when volume is set to "mute"
onwaiting script Executes script when media has stopped playing, but is expected to resume


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 82 / 159432293. Delta: 0.03472 с