[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/escape [Back]  [Original]

escape() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

escape()

Deprecated

Avoid using this feature in new projects. TC39 included the escape() and unescape() methods in Annex B of the ECMAScript specification, which covers JavaScript features with "one or more undesirable characteristics and in the absence of legacy usage would be removed." This feature may be a candidate for removal from web standards or browsers.

escape() , . encodeURI encodeURIComponent .

In this article

escape(str)

str

.

escape() , .. . , : @*_+-./

The hexadecimal form for characters, whose code unit value is 0xFF or less, is a two-digit escape sequence: %xx. For characters with a greater code unit, the four-digit format %uxxxx is used.

js
escape("abc123"); // "abc123"
escape(""); // "%u0442%u0435%u043A%u0441%u0442"
escape(""); // "%u0107"

/*   */
escape("@*_+-./"); // "@*_+-./"

Specification
ECMAScript 2027 LanguageSpecification
# sec-escape-string


Web Proxy Viewer  |  New URL  |  Original Page