9. Scripting

On today’s Web, client-side scripting—namely, JavaScript—makes the world go ’round. Or fade in and out. Or complete your search term as you’re typing it. Or drive an interactive news module. Or control a video player. Or . . . you get the idea.

Alas, showing you how to write JavaScript or any other scripting language is beyond the scope of this book, but I will show you the easy part, which is getting your scripts into a page.

Please also see “Attributes” in Chapter 1 for a list of the events you can apply and capture with JavaScript.

Scripting and Performance Best Practices

A full discussion of best practices pertaining to scripts and page performance is beyond the scope of this book, but I’ll touch on a few points that are high ...

Get The HTML Pocket Guide now with O’Reilly online learning.

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