O'Reilly logo

Learning JavaScript: A Hands-On Guide to the Fundamentals of Modern JavaScript by Tim Wright

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

7. Interacting with the User Through Events

In this chapter, you learn how to interact with users by creating and executing events. Up to this point, you (as the developer) have been in full control over all the conditions in which your functions get executed. You’ve learned how to create functions, build loops, store data, and travel around the DOM. All the interaction controls have been right at your fingertips. A lot of the behind-the-scenes part of an application works this way, but it’s only half the battle. You won’t always have control over when certain functions get executed. You’ll often need to let the user decide when it’s best to utilize a certain function. These are called events.

Events are triggered in the browser when something ...

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