"An event is an unexpected external occurrence".
Most JavaScript-applications perform actions as a response to the event. An event is a signal from the browser that something has happened. In HTML, you can attach event to any specifc HTML DOM element and implement any action that you want to perform when event triggers. Learn more about Javascript events, please visit JavaScript tutorial.
The below table contains document events list which are supported by HTML5 version.
Event Name | Event Description |
---|---|
onafterprint | This event will encounter after page is printed. |
onbeforeprint | This event will encounter before page is printed. |
onhashchange | This event will encounter when changes occure in anchor part of the a URL. |
onstorage | This event will encounter when a web storage is updated. |
onbeforeunload | This event will encounter when the page is about to be unloaded. |
onmessage | This event will encounter when message is triggered. |
ononline | This event will encounter when the browser works online. |
onoffline | This event will encounter when the browser works offline. |
onpageshow | This event will encounter when a user navigates to a page. |
onresize | This event will encounter when the resized browser window. |
onunload | This event will encounter when page has unloaded. |
onpagehide | This event will encounter when a user move to another page. |
onpopstate | This event will encounter when the window's history changes. |
The below table contains form events list which are supported by HTML5 version.
Event Name | Event Description |
---|---|
oninput | This event will encounter when an input element gets user input. |
oninvalid | This event will encounter when an element is invalid. |
onreset | This event will encounter when user reset form. |
oncontextmenu | This event will encounter when a context menu is triggered. |
The below table contains mouse events list which are supported by HTML5 version.
Event Name | Event Description |
---|---|
ondrop | This event will encounter when dragged element has been dropped. |
ondragstart | This event will encounter when start drag operation. |
ondragleave | This event will encounter when an element leaves a valid drop target. |
ondragover | This event will encounter when the element is being dragged over a valid drop target. |
ondragenter | This event will encounter when element has been dragged to a valid drop target. |
ondrag | This event will encounter when element is dragged. |
ondragend | This event will encounter when drag operationv completed. |
The below table contains media events list which are supported by HTML5 version.
Event Name | Event Description |
---|---|
onabort | This event will encounter when loading of a resource(image, file or object) has been aborted. |