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'); // "ć"
Specifications
Specification | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) The definition of 'unescape' in that specification. |
Padrão | Definição Inicial. |
ECMAScript 5.1 (ECMA-262) The definition of 'unescape' in that specification. |
Padrão | Definido na compatibilidade Annex B |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'unescape' in that specification. |
Padrão | Difinito na (normativa) Annex B Para novidades adicionais do ECMAScript para browsers |
ECMAScript (ECMA-262) The definition of 'unescape' in that specification. |
Padrão em tempo real | Difinito na (normativa) Annex B Para novidades adicionais do ECMAScript para browsers |
Compatibilidade com navegadores
BCD tables only load in the browser