CHAPTER 11Event Handling
Browsers have the ability to invoke JavaScript in response to browser events or user actions within a Web page. For example, it’s possible to specify JavaScript that is to be run whenever a page loads or when a user clicks a particular link or modifies a form field. The actions to which JavaScript can respond are called events. Events are the glue that brings together the user and the Web page; they enable pages to become interactive, responsive to what a user is doing. An event model defines the ways the events are processed and how they are associated with the various document and browser objects.
Like many other aspects of JavaScript, the event models of major browsers predictably evolved in separate, incompatible ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access