2. Start Me Up!
In This Chapter
Putting Comments in Scripts 29
Redirecting the User with a Link 37
Using JavaScript to Enhance Links 39
Using Multi-Level Conditionals 43
Enough of the warm up; it’s time to get scripting. In this chapter, you’ll learn where to put your scripts in your HTML; how you can leave comments in your scripts so that you can more easily understand them at a later time; and how you can use scripts to communicate with the user. You’ll also see how to make the page automatically change to another page (called redirection). Let’s get to it!
Get JavaScript: Visual QuickStart Guide, Eighth Edition 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.