Chapter 21. Using Unobtrusive JavaScript

WHAT YOU’LL LEARN IN THIS CHAPTER:

• Best practices for creating unobtrusive scripts

• Separating content, presentation, and behavior

• Following web standards to create cross-browser scripts

• Reading and displaying browser information

• Using feature sensing to avoid errors

• Supporting non-JavaScript browsers

In this chapter, you’ll learn some guidelines for creating scripts and pages that are easy to maintain, easy to use, and follow web standards. This is known as unobtrusive scripting: Scripts add features without getting in the way of the user, the developer maintaining the code, or the designer building the layout of the site. You’ll also learn how to make sure your scripts will work in multiple ...

Get Sams Teach Yourself HTML, CSS and JavaScript All in One 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.