HTML Event Methods


HTML DOM events allow JavaScript to register different event handlers on elements in an HTML document.

Events are normally used in combination with functions, and the function will not be executed before the event occurs (such as when a user clicks a button).

For a tutorial about Events, read our JavaScript Events Tutorial.


HTML DOM Event Methods

Method Description Belongs To
getModifierState() Returns true if a specified key is activated MouseEvent
getTargetRanges() Returns an array containing target ranges that will be affected by the insertion/deletion InputEvent
preventDefault() Cancels the event if it is cancelable, meaning that the default action that belongs to the event will not occur Event
stopImmediate
Propagation()
Prevents other listeners of the same event from being called Event
stopPropagation() Prevents further propagation of an event during event flow Event

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.