Ventana atob ()
Ejemplo
Decodifica una cadena codificada en base 64:
let text = "Hello World!";
let encoded = window.btoa(text);
let decoded = window.atob(encoded);
Definición y uso
El atob()
método decodifica una cadena codificada en base 64.
Nota
El atob()
método decodifica una cadena que ha sido codificada por el
btoa()
método.
Ver también:
Sintaxis
window.atob(encoded)
Parámetros
Parameter | Description |
encoded | Required. The string to be decoded. |
Valor devuelto
Escribe | Descripción |
Una cuerda | La cadena decodificada. |
Compatibilidad con navegador
atob()
es compatible con todos los navegadores:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 10-11 | Yes | Yes | Yes | Yes |