| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/escape | [Back] [Original] |
Get to know MDN better
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)
escape @*_+-./
16 0xFF 2 %xx 4 %uxxxx
escape("abc123"); // "abc123"
escape(""); // "%E4%F6%FC"
escape(""); // "%u0107"
// special characters
escape("@*_+-./"); // "@*_+-./"
| ECMAScript 2027 LanguageSpecification # sec-escape-string |
| Web Proxy Viewer | New URL | Original Page |