/

HTML / CSS / JavaScript Tutorial

JavaScript Global method: escape()

[this page | pdf | back links]

The JavaScript Global escape() method encodes a string representing a URI by replacing certain characters by one, two, three or (rarely) four escape sequences representing the UTF-8 encoding of the character. It is depreciated, and encodeURI or encodeURIComponent should be used instead.

 

It has the following syntax with the following parameters:

 

escape(URI)

 

Parameter

Required / Optional

Description

URI

Required

String representing URI to be encoded

 

More details on URI encoding is given here.

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile