Chapter 13. Handling Events
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, ...
Get JavaScript by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.