Event Handler

Event Handler

WebDynamic™ Web Glossary

An event is an action that occurs on a Web page, such as clicking a link or changing the value of a text area. An event may be performed by the user or forced by a script. In JavaScript, an event handler is a mechanism for causing a script to react to an event.

For example, if you set the onClick event handler equal to a function call or a JavaScript statement, and include the event handler as an attribute in a link, the code will be executed when the user clicks the link.