Development JavaScript DHTML


  
    Encoding a URL
    
        var a = "http://www.a.com/?p=value";
        var b = escape(a);
        
        document.write("Original URL: " + a + "
Encoded URL: " + b);
        
        var c = "http%3A//www.a.com/%3Fp%3Dvalue";
        var d = unescape(c);
        
        document.write("
Original URL: " + c + "
Unencoded URL: " + d);