O'Reilly logo

DOM Scripting: Web Design with JavaScript and the Document Object Model, Second Edition by Jeffrey Sambells, Jeremy Keith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Enhancing Content

What this chapter covers:

  • A function that creates a list of abbreviations used in a document

  • A function that adds links to the sources of quotes in a document

  • A function that creates a list of access keys available in a document

In the previous chapter, you saw how you can use the DOM to create markup on the fly. In this chapter, you're going to put those techniques into practice. You'll use the DOM to create discrete chunks of markup that can be added to a web page. You can find the finished function files on the downloads page for this book at the friends of ED website, http://friendsofed.com/.

What not to do

In theory, you could use JavaScript to add important content to a web page. However, that would be a very bad idea, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required