Chapter 14. Browsers and JavaScript

After reading this chapter, you'll be able to

  • Understand the legacy event model.

  • Understand the W3C JavaScript event model.

  • Add event handlers to a Web page using JavaScript.

  • Open new windows with JavaScript.

  • Open new tabs in a Web browser.

  • Create a timer using JavaScript.

Understanding Window Events

Event handling has been used a few times in earlier chapters to react to actions that a visitor might perform or that the document itself does when loaded. These events include the onmouseover() and onmouseout() events used in the previous chapter, along with the onload() and onclick() events used in other earlier chapters. These events match fairly well across all browsers, but you'll see that other events and event handling ...

Get JavaScript Step by Step 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.