Web / JavaScript
JavaScript Event Reference
This reference collects important browser events for common UI tasks. Search by event name, filter by category
and copy ready-to-use addEventListener examples.
Search browser events
Search for event names such as click, input or DOMContentLoaded, target objects
such as window, document or form, or tasks such as forms, keyboard, mouse,
pointer and scrolling.
Searches event name, category, target, description, note and example code.
Searchable event table
| Event | Category | Typical use | Target |
|---|
No matching events found.
Code example and export
Select an event from the table. The example is generated as modern JavaScript with addEventListener
and can be copied directly.
Usage notes
Prefer addEventListener
Use event listeners instead of inline handlers in HTML. This keeps structure, behavior and maintainability better separated.
Remove events cleanly
If a listener needs to be removed later, use a named function. Anonymous functions are harder to remove again.
Use delegation
For many similar elements, one shared listener on a container can be more efficient than many individual listeners.