The unescape() function was deprecated in JavaScript version 1.5. Use decodeURI() or decodeURIComponent() instead.
The unescape() function was deprecated in JavaScript version 1.5. Use decodeURI() or decodeURIComponent() instead.
The unescape() function decodes an encoded string.
unescape(string)
Parameter | Require | Description |
---|---|---|
string | Required. | The string to be decoded |
A String, representing the decoded string
Encode and decode a string:
var str="Need tips? this is !@#$%^&*()_+!"; var str_esc=escape(str); console.log(str_esc + "\n") console.log(unescape(str_esc))//from w ww.j a va 2 s . co m