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, ...

Get DOM Scripting: Web Design with JavaScript and the Document Object Model, Second Edition now with O’Reilly online learning.

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