Event Handler

JavaScript applications in the Navigator are largely event-driven. Events are actions that occur, usually as a result of something the user does.

For example, a button click is an event, as is giving focus to a form element. There is a specific set of events that Navigator recognizes. You can define Event handlers, scripts that are automatically executed when an event occurs.

Event handlers are embedded in documents as attributes of HTML tags to which you assign JavaScript code to execute. The general syntax is

Bookmark the permalink.