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 ...

Get JavaScript Step by Step now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.