Fish Touching🐟🎣

JavaScript Event

Apr 3, 2023

MDN
event reference

# Events

An event may occur when

# Events Handler

To react to an event, you attach an event handler to it. This is a block of code (usually a JavaScript function that you as a programmer create) that runs when the event fires. When such a block of code is defined to run in response to an event, we say we are registering an event handler.

Web events are not part of the core JavaScript language — they are defined as part of the APIs built into the browser.

# onload

Execute a JavaScript immediately after a page has been loaded: