interviews.dotnetthread.com

↑ Grab this Headline Animator

Monday, June 2, 2008

Explain escape and unescape functions of JavaScript.

The escape function encodes a string so that it can be easily read on all computers, whereas unescape function decodes strings that are encoded with escape function.

var strTest="Welcome John Smith";

strTest=escape(strTest);document.write (strTest); // returns Welcome%20John%20Smith

strTest=unescape(strTest);document.write(strTest); // returns Welcome John Smith

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.

 

Latest Articles