contents   index   previous   next



global.escape()

syntax:

escape(str)

where:

str - with special characters that need to be handled specially, that is, escaped.

 

return:

string - with special characters escaped or fixed so that the string may be used in special ways, such as being a URL.

 

description:

The escape() method receives a string and escapes the special characters so that the string may be used with a URL. This escaping conversion may be called encoding. All uppercase and lowercase letters, numbers, and the special symbols, @ * + . /, remain in the string. All other characters are replaced by their respective unicode sequence, a hexadecimal escape sequence. This method is the reverse of global.unescape().

 

see:

global.unescape(), String escape()

 

example:

escape("Hello there!");

// Returns "Hello%20there%21"

 


global.eval()