JavaScript DHTML/Development/escape
Encoding a URL
<source lang="html4strict">
<html>
<head> <title>Encoding a URL</title> <script type="text/javascript"> var a = "http://www.a.ru/?p=value"; var b = escape(a); document.write("Original URL: " + a + "
Encoded URL: " + b); var c = "http%3A//www.a.ru/%3Fp%3Dvalue"; var d = unescape(c); document.write("
Original URL: " + c + "
Unencoded URL: " + d); </script> </head> <body> </body>
</html>
</source>