DOM Manipulation Event Handling Essentials 1737451700
DOM Manipulation Event Handling Essentials 1737451700
JavaScript
Dom Manipulation
4
Event Handling
Essentials
Slim toumi
Slim toumi
JavaScript tips
Adding Event
Listeners
Slim toumi
Slim toumi
JavaScript tips
Mouse Events
click Occurs when the element is clicked.
dblclick Occurs when the element is double-clicked.
mousedown Occurs when the mouse button is pressed over an element.
mouseup Occurs when the mouse button is released over an element.
mousemove Occurs when the mouse pointer moves over an element.
Keyboard Events
keydown Occurs when a key on the keyboard is pressed down.
keyup Occurs when a key on the keyboard is released.
Form Events
submit Occurs when a form is submitted.
change Occurs when the value of an input element changes.
focus Occurs when an element gets focus.
blur Occurs when an element loses focus.
Window Events
load Occurs when a page has finished loading.
unload Occurs when the user leaves the page.
resize Occurs when the browser window is resized.
scroll Occurs when the user scrolls in the window.
Document Events
DOMContentLoaded Occurs when the document has been completely loaded and parsed.
readystatechange Occurs when the readyState of the document changes.
Touch Events
touchstart Occurs when a touch point is placed on the touch surface.
touchend Occurs when a touch point is removed from the touch surface.
touchmove Occurs when a touch point is dragged across the touch surface.
Custom Events You can also create and dispatch custom events using
the CustomEvent constructor.
Slim toumi
Slim toumi
JavaScript tips
Removing Event
Listeners
Slim toumi
Slim toumi
JavaScript tips
Stop Propagation
Slim toumi
Slim toumi
JavaScript tips
Default Action
Suppression
Slim toumi
Slim toumi
JavaScript tips
Slim toumi
Slim toumi