Chapter 11. Going Beyond the Box (or Should That Be Head?)

Well done! You've made it this far! In this, a very short and quick chapter, you're not looking at any new JavaScript. No, what you're going to be looking at here is where you can place your JavaScript.

So far, all the JavaScript you've looked at has been confined to the header of the Web page, imprisoned in between <script> tags. Now it's time to look at how you can write JavaScript that can break out of these constraints.

This chapter teaches you about the following:

  • What other ways you can add JavaScript to a Web page

  • How to create a .JS file and link it to a Web page

  • How to write inline JavaScript

  • The advantages and disadvantages of each method

Get JavaScript™ 1.5 by Example 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.