Chapter 14: Applied JavaScript

Return to Chapter 14


To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.

Style Sheet Switcher

See it run: Style Sheet Switcher

Script 14.15

This HTML page has the content for the page and the user controls, and it calls the external stylesheets that the user can choose.

Script 14.16

This Cascading Style Sheet contains the styles that always load.

Script 14.17

This style sheet changes all the text to a smaller, sans-serif font.

Script 14.18

This style sheet changes the page text to a larger serif font.

Script 14.19

This JavaScript handles setting the active style sheet.