DEV Community

Cover image for JavaScript Events
Sadiq Shah
Sadiq Shah

Posted on

JavaScript Events

JavaScript Events:

An event is a signal that something happened.
All DOM generated signals.

Types of Events

There are many Events in JavaScript but some events discuss in this article.

- Mouse Events

  1. Click : Its performed when mouse click on any element. and touchscreen user can tabs to perform this event.
  2. contextmenu : Its performed when mouse right click on any element.
  3. mouseover : Its performed when mouseover the element.
  4. mouseout : Its performed when mouseout the element.
  5. mouseup : Its performed when mouse pressed.
  6. mousedown: Its performed when mouse released over an element.

- Keyboard Events

1.keydown and keyup – when a keyboard key is pressed and released.

- Form Element Events

  1. submit: when the visitor submits a

  2. focus: when the visitor focuses on an element, e.g. on an

- Document Events:

  1. DOMContentLoaded: when the HTML is loaded and processed, DOM is fully built.

- CSS events:

  1. transitionend: when a CSS-animation finishes.

Top comments (0)