Encode and decode a string:
The output of the code above will be:
The unescape() function was deprecated in JavaScript version 1.5. Use decodeURI() or decodeURIComponent() instead.
The unescape() function decodes an encoded string.
Function | |||||
---|---|---|---|---|---|
unescape() | Yes | Yes | Yes | Yes | Yes |
Parameter | Description |
---|---|
string | Required. The string to be decoded |
Return Value: | A String, representing the decoded string |
---|