Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 2.01 KB

File metadata and controls

57 lines (48 loc) · 2.01 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
escape Function (JavaScript) | Microsoft Docs
01/18/2017
windows-client-threshold
devlang-javascript
language-reference
escape
JavaScript
TypeScript
DHTML
encoding string objects
Escape method
hexadecimal
String object, encoding
caa92bea-ba69-4109-a68a-6e2debda463a
11
mikejo5000
mikejo
ghogen

escape Function (JavaScript)

Encodes strings so they can be read on all computers. Deprecated.

Syntax

escape(charString)   

Remarks

The required charString argument is any String object or literal to be encoded.

The escape function returns a string value (in Unicode format) that contains the contents of charstring. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as "%20."

Characters with a value greater than 255 are stored using the %u xxxx format.

Note

The escape function should not be used to encode Uniform Resource Identifiers (URI). Use encodeURI and encodeURIComponent functions instead.

Applies To: Global Object

Requirements

[!INCLUDEjsv1]

See Also

encodeURI Function
encodeURIComponent Function
String Object
unescape Function