Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In your experience with JavaScript so far, most of the scripts you’ve written have executed in a calm, orderly fashion, moving from the first statement to the last. You’ve seen a few event handlers used in sample scripts to focus your attention on other aspects of programming, and it is likely that you used your common sense to follow along with the actions. That alone speaks to the relative ease and simplicity of using JavaScript event handlers within your HTML.
In this chapter, you’ll learn to use the wide variety of event handlers supported by JavaScript. Rather than executing in order, scripts using event handlers can interact directly with the user. You’ll use event handlers in just about every script you write throughout the rest of this book, and in fact they’re likely to feature prominently in most scripts you will write, period.