Complete JavaScript Events Table

Overview

JavaScript provides a wide variety of events that can be used to create interactive web applications. Events can be grouped into categories like mouse, keyboard, form, window, clipboard, media, drag & drop, animation, and more.

Event Categories and Events

Category Event Description
MouseclickWhen the element is clicked
dblclickWhen the element is double-clicked
mousedownWhen the mouse button is pressed
mouseupWhen the mouse button is released
mousemoveWhen the mouse is moved
mouseoverWhen the pointer enters an element
mouseoutWhen the pointer leaves an element
contextmenuWhen the right mouse button is clicked
KeyboardkeydownWhen a key is pressed
keyupWhen a key is released
keypressWhen a key is pressed and released (deprecated)
FormsubmitWhen a form is submitted
changeWhen an element value changes
inputWhen input changes in real-time
focusWhen the element gets focus
blurWhen the element loses focus
resetWhen the form is reset
ClipboardcopyTriggered when copying content
cutTriggered when cutting content
pasteTriggered when pasting content
Drag & DropdragElement is being dragged
dragstartDrag starts
dragendDrag ends
dragoverElement is dragged over a drop target
dragenterDragged element enters a drop zone
dragleaveDragged element leaves a drop zone
MediaplayMedia starts playing
pauseMedia is paused
endedMedia playback ends
volumechangeVolume is changed
timeupdatePlayback position has changed
WindowloadWhen the page is fully loaded
unloadWhen the user leaves the page
resizeWhen the window is resized
scrollWhen the user scrolls the document
beforeunloadWhen about to leave the page (confirmation)
TouchtouchstartFinger touches screen
touchmoveFinger is dragged on screen
touchendFinger is removed from screen
PointerpointerdownPointer is pressed
pointerupPointer is released
pointermovePointer moves over element
AnimationanimationstartCSS animation starts
animationendCSS animation ends
animationiterationAnimation repeats
TransitiontransitionstartCSS transition starts
transitionendCSS transition ends
MiscellaneouserrorScript or resource fails to load
wheelMouse wheel is scrolled

Conclusion

Events allow developers to interact with users in real-time. Knowing these events helps you build powerful, interactive user interfaces across devices and platforms.