unrlencode using javascript
escape(string)
The function escape() in javascript do the same work
as urlencode() do in PHP
All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as “%20.”
This function is convenient when encoding a string to be used in a query part of an URL, as a convenient way to pass variables to the next page.
encodeURI() do the reverse process ie,
The Original string can be obtained by passing the result of escape()
to encodeURI()
