This tutorial shows you how to detect if the caps lock is on using JavaScript DOM API.
Events
This section shows you the most commonly used functions for dealing with events in the web browsers.
Stop Propagation of Events
This tutorial shows you how to stop the propagation of an event in both capturing and bubbling phases using the Event.stopPropagation() method.
Prevent Default Action of Events
This tutorial shows you how to prevent the default action of an event by using the preventDefault() method of the Event object.
Check If the Document is Ready
This tutoial shows you how to check if the document is ready using vanilla JavaScript.
Create a One-Off Event Handler
This tutorial shows you how to use the addEventListener() method to create a one-off event handler that execute only once when the event occurs for the first time.
Remove an Event Handler
This tutorial shows you how to use the removeEventListener() method to remove an event handler from an event of an element.
Add an Event Handler
This tutorial shows you how to attach an event handler to an event of an element in JavaScript.
Detect If an Element has focus
This tutorial shows you how to detect if an element has the focus.
Trigger an Event
This tutorial shows you how to trigger an event on an element programmatically using JavaScript DOM API.