What are Important Events in Javascript ?

Few of the important events are listed below..

Input Events

  • onsubmit - triggers on submitting a form.
  • onselect - triggers on selecting an element.
  • onchange - triggers when changes happen to an element.
  • onfocus - triggers when windows gets focus.
  • onreset - triggers when user clicks reset button.
  • onblur - triggers when window loses focus.
  • onkeyup - triggers on releasing a key.
  • onkeydown - triggers on pressing a key.

Click Events

  • onclick - trigger on clicking a mouse button.
  • ondblclick - triggers on double clicking mouse button.

Mouse Events

  • ondrag - triggers when element is dragged.
  • ondragend - triggers when drag ends.
  • ondragstart - triggers when drag starts.
  • ondragenter - triggers when dragged element is dropped.
  • ondragleave - triggers on leaving target while dragging element.
  • onmouseover - triggers when mouse pointer moves over element.
  • onmousedown - triggers on pressing mouse button.
  • onmouseup - triggers on releasing mouse button.
  • onscroll - triggers on scrolling a scroll bar of an element.

Load Events

  • onload- triggers when page has been loaded.
  • onerror- triggers when an error occurs when loading an image.
  • onunload- triggers when browser closes document.


You May Interest

What is Namespace in Javascript ?

What is Alert Method in Window Object in Javascript ?

What is go Method of History Object in Javascript ?

What are Advantages of Using External Javascript ?

What is Promise in Javascript ?