JavaScript DHTML/Development/escape
Encoding a URL
<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 + "<BR>Encoded URL: " + b);
var c = "http%3A//www.a.ru/%3Fp%3Dvalue";
var d = unescape(c);
document.write("<BR>Original URL: " + c + "<BR>Unencoded URL: " + d);
</script>
</head>
<body>
</body>
</html>