generated by an LLM, and I haven't verified these. I just found it ridiculous that this wasn't coming up in search results, so I needed a place to get a quick reference.
I'll turn this into it's own page/website with examples.
Mouse Events
click
- Occurs when an element is clicked
dblclick
- Occurs when an element is double-clicked
mousedown
- Occurs when a pointing device button is pressed on an element
mouseup
- Occurs when a pointing device button is released on an element
contextmenu
- Occurs when the context menu is invoked on an element
mouseout
- Occurs when a pointing device leaves the element
mouseover
- Occurs when a pointing device enters the element
mousewheel
- Occurs when the wheel button is rotated
Touch Events
touchstart
- Occurs when a touch point first makes contact with the touch surface
touchend
- Occurs when the touch point is removed from the touch surface
touchmove
- Occurs when the touch point moves along the touch surface
touchcancel
- Occurs when a touch point is removed from the touch surface without going through a lift-off detection phase
Keyboard Events
keydown
- Occurs when a key is pressed down
keyup
- Occurs when a key is released
keypress
- Occurs when a key is pressed and held down (except shift, fn, caps lock)
Form Events
focus
- Occurs when an element gets focus
blur
- Occurs when an element loses focus
change
- Occurs when a form control has lost the focus but its value has been modified
submit
- Occurs when a form is submitted
Window Events
resize
- Occurs when the window is resized
scroll
- Occurs when the window is scrolled
scrollend
- Occurs at the end of a scroll
event. Not supported by Safari, so needs this polyfill: ScrollyFills
load
- Occurs when a resource and its dependent resources have finished loading
unload
- Occurs when the document or a child resource has been unloaded
beforeunload
- Occurs before unloading documents
hashchange
- Occurs when the URL's hash (fragment identifier) changes
Other Common Events
error
- Occurs when an error occurs during script execution
abort
- Occurs when an XMLHttpRequest request is aborted
online/offline
- Occurs when the network connection state changes
animationstart
- Occurs when a CSS animation starts
transitionend
- Occurs when a CSS transition ends