Name

escape() — NN 2 IE J1 ECMA 1

Synopsis

escape(string[, 1])

Returns a URL-encoded version of the string passed as a parameter to the function. URL encoding converts non-alphanumeric characters to hexadecimal values (such as %20 for the space character). URL-encoded strings do not normally encode the plus symbol because those symbols are used to separate components of search strings. If you must have the plus symbol encoded as well, Navigator 4 offers a second parameter (a numeral 1) to turn on that switch for the method.

Returned Value

A string.

Parameters

string

Any string value.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.