January 2001
Beginner
312 pages
6h 4m
English
The String object enables manipulation and formatting of text strings and also enables substrings within strings to be found.
Two of the simplest methods of the String objects are toUpperCase and toLowerCase. Here is a simple example in which the text inputted into a prompt box is converted to uppercase (shown in Figure 9.13):
<script language="JavaScript">
<!-- Cloaking device on!
inpTxt = prompt("Enter some text","HERE!");
alert(inpTxt.toUpperCase());
// Cloaking device off -->
</script>

And here is an example in which the text is converted ...
Read now
Unlock full access