unescape()
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
escape
. Porque a função 'unescape' está obsoleta, ao invez disso, use
decodeURI
ou
decodeURIComponent
.
Nota:
Não use unescape
para decodificar URIs, use decodeURI
ao invez disso.
Syntax
unescape(str)
Parâmetros
str
-
Uma string a ser decodificada.
Valor retornado
Uma nova string na qual alguns caracteres tem que ser 'unescaped'.
Descrição
A função unescape
é uma propriedade do objeto global.
Exemplos
unescape("abc123"); // "abc123"
unescape("%E4%F6%FC"); // "äöü"
unescape("%u0107"); // "ć"
Especificações
Specification |
---|
ECMAScript® 2025 Language Specification # sec-unescape-string |
Compatibilidade com navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
unescape |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Deprecated. Not for use in new websites.