An action or occurrence on the page, such as a mouse click, is referred to as an event . When an event occurs on the page, the item that receives the event notifies the Dynamic Object Model that the event has taken place. This is known as firing the event. An event is trapped or handled if script is present that responds to the firing of that event. Such script is known as an event handler .
Browsers support many types of events, with special emphasis on mouse, keyboard, and focus events.
An item has the focus when it is selected. Only one item can have the focus at any particular time. For instance, when you work with a large online form that contains many text entry fields, you can type in only one field at a time. The field you can type in is the one that currently has the focus. The onclick event is a special event that can be fired by either the mouse or the keyboard.