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

External links:

User Contributed Comments

Post Content

Post Content