HTML Event








Event Description HTML5
onafterprint trigger Javascript after the document is printedYes
onbeforeprint trigger Javascript run before the document is printedYes
onbeforeunload trigger Javascript when the document is about to be unloadedYes
onblur trigger Javascript when the element loses focusNo
onchange trigger Javascript when the element value is changedNo
onclick trigger Javascript when a mouse is clicked on the elementNo
oncontextmenu trigger Javascript run when a context menu is triggeredYes
oncopy trigger Javascript when the user copies the content of an elementNo
oncut trigger Javascript when the user cuts the content of an elementNo
ondblclick trigger Javascript when a mouse is double-clicked on the elementNo
ondrag trigger Javascript when an element is draggedYes
ondragend trigger Javascript when a drag operation is overYes
ondragenter trigger Javascript when an element is dragged to a valid drop targetYes
ondragleave trigger Javascript when an element leaves a valid drop targetYes
ondragover trigger Javascript when an element is being dragged over a valid drop targetYes
ondragstart trigger Javasript when a drag operation is startedYes
ondrop trigger Javascript when dragged element is being droppedYes
onfocus trigger Javascript when the element gets focusNo
onhashchange trigger Javascript when the anchor part of URL is changedYes
oninput trigger Javascript when an element gets user inputYes
onkeydown trigger Javascript when a user is pressing a keyNo
onkeypress trigger Javascript when a user pressed a keyNo
onkeyup trigger Javascript when a user releases a keyNo
onload trigger Javascript after the page is finished loadingNo
onmousedown trigger Javascript when a mouse button is pressed on an elementNo
onmousemove trigger Javascript when the mouse pointer is moving over an elementNo
onmouseout trigger Javascript when the mouse pointer moves out of an elementNo
onmouseover trigger Javascript when the mouse pointer moves over an elementNo
onmouseup trigger Javascript when a mouse button is releasedNo
onoffline trigger Javascript when the browser starts to work offlineYes
ononline trigger Javascript when the browser starts to work onlineYes
onpageshow trigger Javascript when a user navigates to a pageYes
onpaste trigger Javascript when the user pastes some content in an elementNo
onreset trigger Javascript when the Reset button is clickedYes
onresize trigger Javascript when the browser window is resizedYes
onscroll trigger Javascript when an element's scrollbar is being scrolledYes
onsearch trigger Javascript when the user types in <input="search">No
onselect trigger Javascript when text is selected in an elementNo
onshow trigger Javascript when a <menu> element is shown as a context menuYes
onsubmit trigger Javascript when a form is submittedNo
ontoggle trigger Javascript when the user opens or closes the <details> elementYes
onunload trigger Javascript when page has unloaded or the browser window is closedNo
onwheel trigger Javascript when the mouse wheel rolls up or down over an elementYes