TOC PREV NEXT INDEX

domref



window.escape()


Encodes a string.

Syntax

sEscaped = window.escape(sRegular)
 

Parameters

sEscaped is the endoded string.

sRegular is a regular string

Example

alert(escape("http://www.cnn.com"));
 
// displays: http%3Awww.cnn.com
 

Notes

The escape() method converts special characters (any characters that are not regular text or numbers) into hexadecimal characters, which is especially necessary for setting the values of cookies.

Specification

DOM Level 0. Not part of specification.
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX