HTML DOM addEventListener() Method (original) (raw)
Last Updated : 13 Jun, 2023
The addEventListener() method attaches an event handler to the specified element.Syntax:
element.addEventListener(event, function, useCapture)
Note: The third parameter use capture is usually set to false as it is not used. Below program illustrates the DOM addEventListener():Example:
html `
DOM Location host Property