Explain unescape() and escape() in JavaScript?
The escape() function encodes a string.
This function makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters.
This function encodes special characters, with the exception of: * @ - _ + . /
<script type="text/javascript"> document.write(escape("Need tips? Visit here")); </script>
The unescape() function decodes an encoded string.
<script type="text/javascript"> str="Need tips? Visit here"; str_escape=escape(str); document.write(str_escape + "<br />") document.write(unescape(str_escape)) </script>