Chapter 8: Forms and Regular Expressions

Return to Chapter 8

 

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.

Formatting Strings

See it run: Formatting Strings

Script 8.5

This JavaScript takes a name entered in any format and replaces it with the capitalization you desire.