escape() : escape « Global « JavaScript Tutorial






Syntax

escape(string)
    escape(expression)

The escape() method returns a string object in which all non-alphanumeric characters are converted to their numeric equivalent in the form %XX.

The XX is a hexadecimal number representing the non-alphanumeric character.

<html>
    <script lanuguage="JavaScript">

    var newString = escape("A & B C");
    document.write(newString);
    </script>
</html>








8.2.escape
8.2.1.escape()
8.2.2.The following example shows how to return the escape() method's interpretation of user input.