Global.unescape() : unescape « Global « JavaScript Tutorial






Syntax

unescape(string)

The unescape() method takes a hexadecimal value and returns the ISO-Latin-1 ASCII equivalent.

The unescape() method performs the opposite operation of the escape() method.

The unescape() method is commonly used to escape user-entered data before form submission.

The following example uses the unescape() Method to Convert a Hexadecimal Value to Its ASCII Equivalent.

<html>
    <script language="JavaScript">
    <!--
    var escapedVal = "%40";

    var unescapedVal = unescape(escapedVal);

    document.write('The <I>escapedVal</I> value (' + escapedVal + ") ");
    document.write("evaluates to " + unescapedVal);
    -->
    </script>
</html>








8.12.unescape
8.12.1.Global.unescape()