O'Reilly logo

JavaScript Step by Step by Steve Suehring

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

Chapter 13. JavaScript events and the browser

After completing this chapter, you will be able to

  • Understand the legacy event model.

  • Understand the W3C JavaScript event model.

  • Add event handlers to a webpage by using JavaScript.

  • Open new windows by using JavaScript.

  • Open new tabs in a web browser.

  • Create a timer by using JavaScript.

Understanding window events

You’ve seen event handling used a few times in earlier chapters to respond to user actions or document events. To review, the window object’s events include mouseover() and mouseout(), and load() and click(). These events are fairly well standardized across all browsers, but other events and event handling are not as easy to implement. This section explores events and how you use them in JavaScript ...

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