What is an event? Any action that triggers the execution of JavaScript program code is called an event. Events are usually triggered by the web users. For example, clicking the mouse is an event, dragging the mouse over a hyperlink is also an event. There are three categories of events or rather event handlers in JavaScript, namely events associated with forms, events associated with links and events associated with windows.