HTML5 Events

"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.

Window Events Attributes

The below table contains document events list which are supported by HTML5 version.

Event NameEvent Description
onafterprintThis event will encounter after page is printed.
onbeforeprintThis event will encounter before page is printed.
onhashchangeThis event will encounter when changes occure in anchor part of the a URL.
onstorageThis event will encounter when a web storage is updated.
onbeforeunloadThis event will encounter when the page is about to be unloaded.
onmessageThis event will encounter when message is triggered.
ononlineThis event will encounter when the browser works online.
onofflineThis event will encounter when the browser works offline.
onpageshowThis event will encounter when a user navigates to a page.
onresizeThis event will encounter when the resized browser window.
onunloadThis event will encounter when page has unloaded.
onpagehideThis event will encounter when a user move to another page.
onpopstateThis event will encounter when the window's history changes.

Form Events

The below table contains form events list which are supported by HTML5 version.

Event NameEvent Description
oninputThis event will encounter when an input element gets user input.
oninvalidThis event will encounter when an element is invalid.
onresetThis event will encounter when user reset form.
oncontextmenuThis event will encounter when a context menu is triggered.

Mouse Events

The below table contains mouse events list which are supported by HTML5 version.

Event NameEvent Description
ondropThis event will encounter when dragged element has been dropped.
ondragstartThis event will encounter when start drag operation.
ondragleaveThis event will encounter when an element leaves a valid drop target.
ondragoverThis event will encounter when the element is being dragged over a valid drop target.
ondragenterThis event will encounter when element has been dragged to a valid drop target.
ondragThis event will encounter when element is dragged.
ondragendThis event will encounter when drag operationv completed.

Media Events

The below table contains media events list which are supported by HTML5 version.

Event NameEvent Description
onabortThis event will encounter when loading of a resource(image, file or object) has been aborted.

See Also

HTML5 Web Storage
HTML5 Audio Tag
HTML5 Video Tag
HTML5 Canvas
HTML5 SVG Tag


 
 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.