Chapter 10. Event Handlers

CONTENTS>>

To have an interactive web page using JavaScript, you need two things: a user action and a reaction by the browser. The most common reaction in an HTML page is clicking the mouse, and you have seen several examples of the mouse firing off a function using the HTML onClick event handler in example scripts in this book. Some scripts have even included onLoad event handlers that fire a script automatically when a page is loaded. So by now, you have some idea about event handlers from your experience with basic functions such as rollovers.

This chapter takes a closer look at the events and event handlers in HTML pages and ...

Get JavaScript Design 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.