Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing

Example 7.15:
Built-in Functions--unescape


This page uses a built-in function, unescape(form.txtCharacter.value), to return a character from an ASCII encoding value in the ISO Latin-1 character set. Type an ASCII encoding value (such as %3F, %27, and so on) into the text box, then click on the button to see the character it represents:
Type an ASCII encoding value:



These are the scripts we used. First, in the HEAD: <SCRIPT LANGUAGE="JavaScript"> <!-- function ConvertASCII(form) { form.txtASCII.value= unescape(form.txtCharacter.value) } //--> </SCRIPT> Later in the Web page the function is called from this form: <FORM> Type an ASCII encoding value: <INPUT TYPE="text" NAME="txtCharacter" SIZE=12><P> <INPUT TYPE="button" VALUE="Character" onclick="ConvertASCII(this.form)"> <INPUT TYPE="text" NAME="txtASCII" SIZE=20> </FORM> Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing