Jump to content

JavaScript/W3C event handlers

From Wikibooks, open books for an open world



Attribute Trigger
onabort Loading of image was interrupted
onblur Element loses focus
onchange Element gets modified
onclick Element gets clicked
ondblclick Element gets double clicked
onerror An error occurred loading an element
onfocus An element received focus
onkeydown A key was pressed when an element has focus
onkeypress A keystroke was received by the element
onkeyup A key was released when the element has focus
onload An element was loaded
onmousedown The mouse button was pressed on the element
onmousemove The mouse pointer moves while inside the element
onmouseout The mouse pointer was moved outside the element
onmouseover The mouse pointer was moved onto the element
onmouseup The mouse button was released on the element.
onreset The form's reset button was clicked
onresize The containing window or frame was resized
onselect Text within the element was selected
onsubmit A form is being submitted
onunload The content is being unloaded (e.g. window being closed)