[Contents] [Previous] [Next] [Index]

unescape

Returns the ASCII string for the specified value.

Core function

Implemented in

Navigator 2.0

Syntax

unescape(string)

Parameters

string
A string containing characters in the form "%xx", where xx is a 2-digit hexadecimal number.

Description

The string returned by the unescape function is a series of characters in the ISO-Latin-1 character set. The unescape function is a top-level JavaScript function not associated with any object. In server-side JavaScript, use this function to decode name/value pairs in URLs.

Examples

The following client-side example returns "&":

unescape("%26")
The following client-side example returns "!#":

unescape("%21%23")
In the following server-side example, val1 has been passed to the request object as a hexadecimal value. The statement assigns the decoded value of val1 to myValue.

myValue = unescape(request.val1)

See also

escape


[Contents] [Previous] [Next] [Index]

Last Updated: 10/31/97 16:38:00


Copyright © 1997 Netscape Communications Corporation