Event Handler

Definition:

Events allow the object to interact with the programmer, and allow objects to interact with the program itself. Users interact with the Web page by performing actions called events such as clicking, scrolling, and entering information in a text box. 

The command statements that respond to an event are called the event handler. This event handler can contain code that is executed when the event occurs. 

You can create a group of programming statements that respond to an event. For example, when the user clicks an object, an event called onClick is generated for that object.