O'Reilly logo

JavaScript by Example, Second Edition by Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Handling Events

image

13.1 Introduction to Event Handlers

JavaScript reacts to events. We have been talking about events since Chapter 1, “Introduction to JavaScript,” because events are inherently part of almost all Web pages and they make the pages interactive and dynamic. JavaScript events are asynchronous, meaning that they can happen at any time. They are actions that are initiated by a user visiting a Web page; for example, if the user submits a form or moves the mouse over a link or an image, he or she might trigger an event. When an event occurs, your browser has some default actions it takes; for example, if you click on a link, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required