JavaScript
Events
Showcase

Mouse Events

onclick

Triggered when a user clicks an element.

ondblclick

Triggered when a user double-clicks an element.

onmousedown

Triggered when a user presses the mouse button over an element.

onmouseup

Triggered when a user releases the mouse button over an element.

onmouseover

Triggered when a user moves the mouse pointer over an element.

onmouseout

Triggered when a user moves the mouse pointer away from an element.

Scroll Events

onscroll

Triggered when the user scrolls the page.

Keyboard Events

onkeydown

Triggered when a user presses a key on the keyboard.

onkeyup

Triggered when a user releases a key on the keyboard.

onkeypress

Triggered when a user presses and releases a key on the keyboard.

Form Events

onsubmit

Triggered when a user submits a form.

onreset

Triggered when a user resets a form.

onchange

Triggered when a user changes the value of a form element.

onfocus

Triggered when a user focuses on a form element.

onblur

Triggered when a user loses focus on a form element.

Validation

Validating whether input has met given conditions

  • At least 8 characters
  • At least one uppercase letter
  • At least one lowercase letter
  • At least one special character
  • At least one number
  • Passwords match

Touch Events

ontouchstart

Triggered when a finger is placed on a touch screen

ontouchmove

Triggered when a finger is dragged across the screen

ontouchend

Triggered when a finger is removed from a touch screen

End