filmov
tv
35 - addEventListener | Events in JavaScript

Показать описание
addEventListener() method attaches an event handler to the document
event: Required. A String that specifies the name of the event.
function: Required. Specifies the function to run when the event occurs.
useCapture:
Optional. A Boolean value that specifies whether the event should be executed in the capturing or in the bubbling phase. Possible values:
true - The event handler is executed in the capturing phase
false- Default. The event handler is executed in the bubbling phase
event: Required. A String that specifies the name of the event.
function: Required. Specifies the function to run when the event occurs.
useCapture:
Optional. A Boolean value that specifies whether the event should be executed in the capturing or in the bubbling phase. Possible values:
true - The event handler is executed in the capturing phase
false- Default. The event handler is executed in the bubbling phase