| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/escape | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
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 .
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.
escape("abc123"); // "abc123"
escape(""); // "%u0442%u0435%u043A%u0441%u0442"
escape(""); // "%u0107"
/* */
escape("@*_+-./"); // "@*_+-./"
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-escape-string |
This page was last modified on 4 2024 . by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |