How to use unescape in JavaScript

This article describe about unescape() Function in JavaScript.
  • 1636

unescape() Function in JavaScript

This function is used to decode and encode string.

Note: escape() function only encode the string.

Syntax

unescape(string)

 

Parameter Description
string Required. string to be decoded.

Example

<!DOCTYPE html>

<html>

<body>

<script type="text/javascript">

    var str = "If you Need any tips? Visit dotnetheaven.com";

    var str_esc = escape(str);

    document.write(str_esc + "<br />")

    document.write(unescape(str_esc))

</script>

</body>

</html>

 

Output


pic11.jpg 

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.