Created
September 6, 2019 18:44
-
-
Save parzibyte/298920648eba4c78b50675d3657d3bb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const $btnCargarPerfil = document.querySelector("#btnCargarPerfil"), | |
$perfil = document.querySelector("#perfil"); | |
$btnCargarPerfil.addEventListener("click", () => { | |
fetch("./perfil.php") | |
.then(respuesta => respuesta.text()) | |
.then(respuestaComoHTML => { | |
$perfil.innerHTML = respuestaComoHTML; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment