Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa JavaScriptQuestions Explain unescape() and escape() in JavaScript?

View Questions and Answers by Category


Have Programming Question? Ask it here!

Explain unescape() and escape() in JavaScript?
1 Answer(s)      4 years and a month ago
Posted in : JavaScript Questions

Explain unescape() and escape() in JavaScript?

View Answers

November 11, 2010 at 11:41 AM

The escape() function encodes a string.

This function makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters.

This function encodes special characters, with the exception of: * @ - _ + . /

<script type="text/javascript">

document.write(escape("Need tips? Visit here"));


The unescape() function decodes an encoded string.

<script type="text/javascript">

str="Need tips? Visit here";
document.write(str_escape + "<br />")


Related Tutorials/Questions & Answers: