Events that addEventListener Can Listen For

`addEventListener` in JavaScript allows you to listen for a wide range of events. Here’s a list of some common events that you can attach listeners to:

Mouse Events:
1. `click` – Mouse click.
2. `dblclick` – Double click.
3. `mousedown` – Mouse button is pressed.
4. `mouseup` – Mouse button is released.
5. `mousemove` – Mouse pointer moves.
6. `mouseover` – Mouse pointer enters an element.
7. `mouseout` – Mouse pointer leaves an element.
8. `mouseenter` – Similar to `mouseover`, but doesn’t bubble.
9. `mouseleave` – Similar to `mouseout`, but doesn’t bubble.
10. `contextmenu` – Right-click event.

Keyboard Events:
11. `keydown` – Key is pressed down.
12. `keyup` – Key is released.
13. `keypress` – Character key is pressed.

Form Events:
14. `submit` – A form is submitted.
15. `reset` – A form is reset.
16. `focus` – Element receives focus.
17. `blur` – Element loses focus.
18. `change` – Value of an input element changes.
19. `input` – Text input changes (modern browsers).
20. `select` – Text in an input or textarea is selected.

Window and Document Events:
21. `load` – Window or frame finishes loading.
22. `unload` – Window or frame is unloaded.
23. `resize` – Window or frame is resized.
24. `scroll` – Document is scrolled.

Touch Events (for mobile devices):
25. `touchstart` – A touch event starts.
26. `touchmove` – Touch point moves.
27. `touchend` – Touch event ends.

Drag and Drop Events:
28. `dragstart` – Drag operation starts.
29. `dragend` – Drag operation ends.
30. `dragenter` – Element is dragged into a target.
31. `dragover` – Element is dragged over a target.
32. `dragleave` – Element is dragged out of a target.
33. `drop` – Element is dropped onto a target.

Media Events:
34. `play` – Media starts playing.
35. `pause` – Media is paused.
36. `ended` – Media playback ends.

Clipboard Events:
37. `copy` – Copy operation is triggered.
38. `cut` – Cut operation is triggered.
39. `paste` – Paste operation is triggered.

Miscellaneous Events:
40. `error` – Error occurs.
41. `loadstart` – Resource starts loading (used for audio and video elements).
42. `loadeddata` – Media data is loaded.
43. `canplay` – Media can start playing.
44. `readystatechange` – State of the document (used for `document`).

These are just some of the common events you can listen for. There are more specialized events and events related to specific elements and libraries. The exact set of events available may vary between browsers and JavaScript frameworks. You can find the full list of events in the documentation for the specific object or element you are working with.

Did I miss any?  Let me know.

Our Plugins

Save SQL Queries

Store SQL queries to debug issues with a WordPress installation. For use in development, not production. When activated, it will intercept and write all SQL statements into a sql_log.txt file in the root of the site installation. It will create a large performance hit, so it’s suggested that the plugin is shut off when not […]

Moon Phase Display

Moon Phase Tracker is a versatile WordPress plugin designed to bring the beauty and mystery of the lunar cycle directly into your website. With seamless integration into the Block Editor and a convenient [moon_phase_tracker] shortcode, this plugin makes it easy to display the current moon phase anywhere on your site—whether it’s a sidebar widget area, […]

Gravity Forms WordPoints Connector

Gravity Forms is a versatile form builder. The WordPoints plugin allows site users to build up in-site point balances. These can be used for site rewards, leaderboard positions, or in-game currency. The connector adds rules to Gravity Forms to adjust user WordPoint balances, awarding or deducting points based on the form behaviour.

We'll take good care of your website.

Copyright © 2026 - Web321 | All Right Reserved