Unescape escaped string in JavaScript

Description

The following code shows how to unescape escaped string.

Example


<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
    var escapedVal = "%40";
    <!--   w w  w. j a  v  a2s  .  c  om-->
    var unescapedVal = unescape(escapedVal);
    
    document.write('The <I>escapedVal</I> value (' + escapedVal + ") ");
    document.write("evaluates to " + unescapedVal);

</script>
</head>
<body>
</body>
</html>

Click to view the demo





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window