Introduction to Events in the DOM with JavaScript
Some of What DOM Events Can Do
DOM events allow us find out when certain actions take place and then run our own code. Some common type of DOM events include:
- Mouse events like onclick, on mouse over
- Keyboard events on for figuring out what keys are pressed and when
- Form elements like on submit, focus or change
- Media events like onplay, on pause, on onseeked
- Drag events like ondrag, ondragenter, ondrop
- General object events like onload, onresize, onscroll
- Other – clipboard, print, touch, transition, speech recognition
In this overview video we look at demos of the different types of events you can work with in the DOM API using JavaScript.
Watch the Demos
Taking it Further with Learning JavaScript
This video introduces a number of different types of Events in JavaScript that this JavaScript for WordPress Master Course goes into much more depth with.
If you are looking for a more advanced JavaScript Events video, check out our post on Event Propagation with Capturing and Bubbling.
To take your learning even further, reserve a seat for the JavaScript for WordPress Master Course. We cover everything you need to know about Events and much much more!!!