Call Us : +91-8376986802 (Viber, WhatsApp)

unescape(), escape()



These are similar to the decodeURI() and encodeURI(), but escape() is used for only portions of a URI.

var myvalue = “Sir Walter Scott”;
document.write(“Original myvalue: “+myvalue);
document.write(“
escaped: “+escape(myvalue));
document.write(“
uri part: “&author=”+escape(myvalue)+”””);

If you use escape() for the whole URI… well bad things happen.

var uri = “http://www.google.com/search?q=sonofusion Taleyarkhan”
document.write(“Original uri: “+uri);
document.write(”
escaped: “+escape(uri));

Leave a Reply