JavaScript escape() Function
- Previous Page encodeURIComponent()
- Next Page eval()
- Go Back to the Previous Level JavaScript Global Reference Manual
Definition and Usage
In JavaScript 1.5, the escape() function is not recommended. Please use encodeURI()
Or encodeURIComponent()
Instead of.
escape()
The function encodes the string.
This function makes the string portable, so it can be transmitted through any network to any computer that supports ASCII characters.
This function encodes special characters, but the following characters are excluded: * @ - _ + . /
Syntax
escape(string)
Parameter Value
Parameter | Description |
---|---|
string | The string to be encoded. |
Technical Details
Return Value: | String, representing the encoded string. |
---|
Browser Support
Function | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
escape() | Support | Support | Support | Support | Support |
- Previous Page encodeURIComponent()
- Next Page eval()
- Go Back to the Previous Level JavaScript Global Reference Manual