HOUR 9:Responding to Events
What You’ll Learn in This Hour:
• How event handlers work
• How event handlers relate to objects
• Creating an event handler
• Testing an event handler
• Detecting mouse actions
• Detecting keyboard actions
• Intercepting events with a special handler
• Adding friendly link descriptions to a web page
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.
In this hour, 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 ...
Get Sams Teach Yourself JavaScript in 24 Hours 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.