HTML and CSS Reference
In-Depth Information
Event Handlers
The following table describes the event handlers used by many JavaScript objects and
page elements.
Event Handler
Occurs When
onabort
Loading a resource is canceled
onafterprint
The page contents have been printed
onbeforeload
The page is about to be loaded by the browser
onbeforeprint
The page contents are about to be printed
onblur
The object loses the keyboard focus
onchange
The user changes a form control value
onclick
The object receives a mouse click
oncontextmenu
A context menu is about to be displayed
ondblclick
The object receives a double-click
ondragend
The dragging of a page object ends
ondragenter
The dragging of a page object is about to begin
ondragover
The dragging of a page object is in progress
ondragstart
The dragging of a page object starts
ondrop
The user completes the process of dragging a page object
onerror
A JavaScript error occurs
onfocus
The object receives the keyboard focus
onhashchanged
The fragment identifier of the location hash has changed
oninput
Input occurs on a form element
onkeydown
The user presses a key
onkeypress
A key press generates a printable character
onkeyup
The user releases a key
onload
The document has fully loaded
onmessage
A script sends a message
onmousedown
The user presses a mouse button
onmousemove
The user moves the mouse pointer
onmouseout
The mouse pointer leaves a page element
onmouseover
The mouse pointer enters a page element
onmouseup
The user release the mouse button
onmousewheel
The user rotates the mouse wheel
onoffline
The browser loses its network connection
ononline
The browser regains its network connection
onpagehide
The page is about to be cached and replaced
onpageshow
The page is loaded and shown
onpopstate
The browser loads a new page
onreset
A Web form is reset
onresize
The user resizes the browser window
onscroll
The user scrolls the browser window
onselect
The user selects text in a form element
Search WWH ::




Custom Search