The Event interface represents an event which takes place in the DOM; some are user-generated (such as the mouse or keyboard events), while others are generated by APIs (such as events that indicate an animation has finished running, a video has been paused, and so forth). The event itself contains the properties and methods which are common to all events.
click – when the mouse clicks on an element (touchscreen devices generate it on a tap).
contextmenu – when the mouse right-clicks on an element.
mouseover / mouseout – when the mouse cursor comes over / leaves an element.
mousedown / mouseup – when the mouse button is pressed/released over an element.
mousemove – when the mouse is moved.
Form element events:
submit – when the visitor submits a <form>.
focus – when the visitor focuses on an element, e.g. on a <input>.
Check more on most common event list
A handler can be set in HTML with an attribute named on<event>.
<input value=”Click me” onclick=”alert(‘Click’)” type=”button”>
The EventTarget.addEventListener() method adds the specified EventListener-compatible object to the list of event listeners for the specified event type on the EventTarget on which it is called. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
type : A case-sensitive string representing the event type to listen for.
options Optional, An options object that specifies characteristics of the event listener.