You are here: Reference > appendix > javascript > event list

Events in JavaScript

The following table contains the complete list of events, their browser support and the associated event objects. If you need the event objects in a hierarchical form, see the page for the Event interface. Bubbles Cancelable Event object
Name that can be used for the addEventListener, removeEventListener and event initialization (initEvent, ...) methods. Name that can be used for event attributes (HTML), shorthand form (e.g. obj.onclick) and for the attachEvent, detachEvent and fireEvent methods. Support Description
abort onabort
Occurs when the user aborts the loading of an img or input:image element.
Bubbles: YesCancelable: No
Event object: UIEvent
activate onactivate
Occurs when an element becomes active.
Bubbles: Yes Cancelable: No
Event object: UIEvent
afterprint onafterprint
Occurs when the browser has built the contents of the current document for printing or for the print preview.
Bubbles: No Cancelable: No
Event object: Event
- onafterupdate
Occurs on a databound object after it updates the data in the data source object.
Bubbles: Yes Cancelable: No
Event object: -
beforeactivate onbeforeactivate
Occurs before an element becomes active.
Bubbles: Yes Cancelable: Partially
Event object: UIEvent
beforecopy onbeforecopy
Occurs before the selection is copied to the clipboard and before the oncopy event.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
9
Event
beforecut onbeforecut
Occurs before the selection is cut from the document and provides a possibility to enable the Cut menu item.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
9
Event
beforedeactivate onbeforedeactivate
Occurs on the active element before it loses the active state.
Bubbles: Yes Cancelable: Yes
Event object: UIEvent
- onbeforeeditfocus
Occurs before an input:file, input:password, input:text or textarea element or an element in an editable region becomes a UI-activated.
Bubbles: Yes Cancelable: Yes
Event object: -
beforepaste onbeforepaste
Occurs before the contents of the clipboard are pasted into the document and provides a possibility to enable the Paste menu item.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
9
Event
beforeprint onbeforeprint
Occurs when the browser starts to build the contents of the current document for printing or for the print preview.
Bubbles: No Cancelable: No
Event object: Event
beforeunload onbeforeunload
Occurs before the browser unloads the document and provides a possibility to display a confirmation dialog, where the user can confirm whether he wants to stay or leave the current page.
Bubbles: No Cancelable: Yes
Event object:
BeforeUnloadEvent
9
Event
- onbeforeupdate
Occurs on a databound object before it updates the data in the data source object.
Bubbles: Yes Cancelable: Yes
Event object: -
blur onblur
Occurs when an element loses focus.
Bubbles: No Cancelable: No
Event object:
FocusEvent
9
Event
bounce onbounce
Occurs when the contents of a marquee element touch one side of the marquee element's bounding rectangle.
Bubbles: No Cancelable: Yes
Event object: Event
- oncellchange
Occurs on a data source object when the data in it has changed.
Bubbles: Yes Cancelable: No
Event object: -
change onchange
Occurs when the selection, the checked state or the contents of an element have changed. In some cases, it only occurs when the element loses the focus.
Bubbles: No Cancelable: No
Event object: Event
CheckboxStateChange -
Occurs when the state of a checkbox has changed.
Bubbles: No Cancelable: No
Event object: Event
click onclick
Occurs when the user clicks on an element.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
contextmenu oncontextmenu
10.5
Occurs when the right mouse button is clicked on an element and the context menu is shown.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
- oncontrolselect
Occurs before a control is selected in an editable region.
Bubbles: Yes Cancelable: Yes
Event object: -
copy oncopy
Occurs before the selection is copied to the clipboard.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
9
Event
cut oncut
Occurs before the selection is cut from the document and added to the clipboard.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
9
Event
- ondataavailable
Occurs each time when a new chunk of data becomes available from the source.
Bubbles: Yes Cancelable: No
Event object: -
- ondatasetchanged
Occurs on a data source object when the initial or a new data set becomes available.
Bubbles: Yes Cancelable: No
Event object: -
- ondatasetcomplete
Occurs on a data source object when all its data becomes available.
Bubbles: Yes Cancelable: No
Event object: -
dblclick ondblclick
Occurs when the user double clicks on an element.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
deactivate ondeactivate
Occurs on the active element when it loses the active state.
Bubbles: Yes Cancelable: No
Event object: UIEvent
DOMActivate -
Occurs when an element becomes active.
Bubbles: Yes Cancelable: Yes
Event object: UIEvent
DOMAttrModified -
9
Fires when an attribute is added, removed or when the value of an attribute is modified by script.
Bubbles: Yes Cancelable: No
Event object: MutationEvent
DOMCharacterDataModified -
9
Fires when a script changes the value of a TextNode.
Bubbles: Yes Cancelable: No
Event object: MutationEvent
DOMFocusIn -
Occurs before an element receives focus.
Bubbles: Yes Cancelable: No
Event object: UIEvent
DOMFocusOut -
Occurs before an element loses the focus.
Bubbles: Yes Cancelable: No
Event object: UIEvent
DOMMouseScroll -
Occurs when the mouse wheel rolls.
Bubbles: No Cancelable: No
Event object:
MouseEvent
3.5
MouseScrollEvent
3.5
DOMNodeInserted -
9
Occurs on a node when it is added to an element.
Bubbles: Yes Cancelable: No
Event object: MutationEvent
DOMNodeInsertedIntoDocument -
Occurs on a node when it is inserted into the document.
Bubbles: No Cancelable: No
Event object: MutationEvent
DOMNodeRemoved -
9
Occurs on a node when it is removed from its parent.
Bubbles: Yes Cancelable: No
Event object: MutationEvent
DOMNodeRemovedFromDocument -
Occurs on a node when it is removed from the document.
Bubbles: No Cancelable: No
Event object: MutationEvent
DOMSubtreeModified -
9
Fires on a node when a modification occurs in the subtree that belongs to it.
Bubbles: Yes Cancelable: No
Event object: MutationEvent
drag ondrag
3
Occurs periodically on the source element during the drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
3
3.5
dragdrop -
3.5
Occurs on a possible target element when the dragged data is dropped on it.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
dragend ondragend
3
Occurs on the source element when the user has finished the drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
3
3.5
dragenter ondragenter
Occurs on an element when the user moves the mouse pointer into it during a drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
3.5
dragexit -
Occurs on an element when the user moves the mouse pointer out of it during a drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
MouseEvent
3.5
DragEvent
3.5
draggesture -
Occurs on the source element when the user starts the drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
MouseEvent
3.5
DragEvent
3.5
dragleave ondragleave
3.5
Occurs on an element when the user moves the mouse pointer out of it during a drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
dragover ondragover
Occurs periodically on an element while the mouse pointer is over it during a drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
3.5
dragstart ondragstart
3.5
Occurs on the source element when the user starts the drag operation.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
drop ondrop
3.5
Occurs on a possible target element when the dragged data is dropped on it.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
93.5
MouseEvent
error onerror
Fires when an error occurs while loading an external file.
Bubbles: No Cancelable: Yes
Event object: Event
error (window) onerror (window)
Fires when a script error occurs.
Bubbles: No Cancelable: Yes
Event object: -
- onerrorupdate
Occurs on a databound object when it cannot update the data in the data source object.
Bubbles: Yes Cancelable: No
Event object: -
- onfilterchange
Occurs after a filter has changed or finished a transition.
Bubbles: No Cancelable: No
Event object: -
finish onfinish
Occurs when a marquee element has finished the scrolling animation.
Bubbles: No Cancelable: Yes
Event object: Event
focus onfocus
Occurs when an element receives focus.
Bubbles: No Cancelable: No
Event object:
FocusEvent
9
Event
focusin onfocusin
Occurs before an element receives focus.
Bubbles: Yes Cancelable: No
Event object: FocusEvent
focusout onfocusout
Occurs after an element loses focus.
Bubbles: Yes Cancelable: No
Event object: FocusEvent
hashchange onhashchange
83.610.65
Occurs when the hash subsection (begins with a '#' sign) of the current document's URL has changed.
Bubbles: Yes Cancelable: No
Event object: Event
help onhelp
Occurs after the user has pressed the F1 key.
Bubbles: Yes Cancelable: Yes
Event object: Event
input oninput
9
Occurs when the text content of an element is changed through the user interface.
Bubbles: No Cancelable: No
Event object: Event
keydown onkeydown
Occurs on an element that has the focus when a key is pressed down and occurs periodically until the key is released.
Bubbles: Yes Cancelable: Yes
Event object: KeyboardEvent
keypress onkeypress
Occurs on an element that has the focus when a key is pressed down and occurs periodically until the key is released.
Bubbles: Yes Cancelable: Yes
Event object: KeyboardEvent
keyup onkeyup
Occurs on an element that has the focus when the user releases a key.
Bubbles: Yes Cancelable: No
Event object: KeyboardEvent
load onload
Occurs when an object has been loaded.
Bubbles: No Cancelable: No
Event object: Event
- onlosecapture
Occurs when the object loses the mouse capture.
Bubbles: No Cancelable: No
Event object: -
message onmessage
83
Occurs when the postMessage method sends a message to the current window.
Bubbles: No Cancelable: Yes
Event object: MessageEvent
mousedown onmousedown
Occurs when the user presses a mouse button over an element.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
mouseenter onmouseenter
Occurs when the user moves the mouse pointer into the area of an element.
Bubbles: No Cancelable: No
Event object: MouseEvent
mouseleave onmouseleave
Occurs when the user moves the mouse pointer out of the element.
Bubbles: No Cancelable: No
Event object: MouseEvent
mousemove onmousemove
Occurs when the user moves the mouse over the element.
Bubbles: Yes Cancelable: No
Event object: MouseEvent
mouseout onmouseout
Occurs when the user moves the mouse pointer out of the element.
Bubbles: Yes Cancelable: No
Event object: MouseEvent
mouseover onmouseover
Occurs when the user moves the mouse pointer into the element.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
mouseup onmouseup
Occurs when the user releases a mouse button over an element.
Bubbles: Yes Cancelable: Yes
Event object: MouseEvent
mousewheel onmousewheel
Occurs when the mouse wheel rolls.
Bubbles: Yes Cancelable: Yes
- onmove
Occurs when the position of an element's top-left corner is changed.
Bubbles: Yes Cancelable: No
Event object: -
- onmoveend
Occurs when the user stops dragging an absolute or relative positioned element in an editable region.
Bubbles: Yes Cancelable: No
Event object: -
- onmovestart
Occurs when the user starts dragging an absolute or relative positioned element in an editable region.
Bubbles: Yes Cancelable: Yes
Event object: -
offline onoffline
83
Occurs when the browser starts to work offline.
Bubbles: No Cancelable: No
Event object: Event
online ononline
83
Occurs when the browser starts to work online.
Bubbles: No Cancelable: No
Event object: Event
overflow -
Occurs when the contents or the size of an element is changed and it causes a scrollbar to appear.
Bubbles: No Cancelable: No
Event object: UIEvent
overflowchanged -
Occurs when the contents or the size of an element is changed and it causes a scrollbar to appear or disappear.
Bubbles: No Cancelable: No
Event object: OverflowEvent
paste onpaste
Occurs before the contents of the clipboard are pasted into the document.
Bubbles: Yes Cancelable: Yes
Event object:
DragEvent
9
Event
- onpropertychange
Occurs every time when the value of an element's property is changed.
Bubbles: No Cancelable: No
Event object: -
RadioStateChange -
Occurs when the state of a radio button has changed.
Bubbles: No Cancelable: No
Event object: Event
readystatechange onreadystatechange
Occurs when the load state of the data that belongs to an element or a HTML document changes.
Bubbles: No Cancelable: No
Event object: Event
readystatechange (XMLDocument) onreadystatechange (XMLDocument)
Occurs when the load state of the XMLDocument object changes.
Bubbles: No Cancelable: No
Event object: -
readystatechange (XMLHttpRequest) onreadystatechange (XMLHttpRequest)
Occurs when the state of the request changes.
Bubbles: No Cancelable: No
Event object: Event
reset onreset
Occurs on a form before it is reset.
Bubbles: No Cancelable: Yes
Event object: Event
resize onresize
Occurs when the size of an object has changed.
Bubbles: No Cancelable: No
Event object:
UIEvent
9
Event
- onresizeend
Occurs when the user stops resizing an element in an editable region.
Bubbles: Yes Cancelable: No
Event object: -
- onresizestart
Occurs when the user starts to resize an element in an editable region.
Bubbles: Yes Cancelable: Yes
Event object: -
- onrowenter
Occurs on a data source object when the current row in it has changed.
Bubbles: Yes Cancelable: No
Event object: -
- onrowexit
Occurs on a data source object before the current row in it changes.
Bubbles: No Cancelable: Yes
Event object: -
- onrowsdelete
Occurs on a data source object before rows are deleted.
Bubbles: Yes Cancelable: No
Event object: -
- onrowsinserted
Occurs on a data source object when rows have been inserted.
Bubbles: Yes Cancelable: No
Event object: -
scroll onscroll
Occurs when the contents of an element have been scrolled.
Bubbles: No Cancelable: No
Event object:
UIEvent
9
Event
search onsearch
Occurs when the user presses the ENTER key or clicks the 'Erase search text' button (x) in an input:search field.
Bubbles: No Cancelable: No
Event object: Event
select onselect
Occurs after some text has been selected in an element.
Bubbles: No Cancelable: Yes
Event object:
UIEvent
9
Event
selectionchange onselectionchange
Occurs when the selection in the document has changed.
Bubbles: No Cancelable: No
Event object: Event
selectstart onselectstart
Occurs at the start of a selection process.
Bubbles: Yes Cancelable: Yes
Event object: Event
start onstart
Occurs when a marquee element begins the scrolling animation and when a new loop starts.
Bubbles: No Cancelable: No
Event object: Event
stop onstop
Occurs when the user aborts the loading of the document.
Bubbles: No Cancelable: No
Event object: Event
submit onsubmit
Occurs on a form element when the user clicks on a submit button in the form.
Bubbles: No Cancelable: Yes
Event object: Event
textInput -
9
Occurs when some characters are entered into an element.
Bubbles: Yes Cancelable: Yes
Event object: TextEvent
underflow -
Occurs when the contents or the size of an element is changed and it causes a scrollbar to disappear.
Bubbles: No Cancelable: No
Event object: UIEvent
unload onunload
Occurs before the browser unloads the document.
Bubbles: No Cancelable: No
Event object: Event

External links:

User Contributed Comments

Post Content

Post Content