diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index ecf0e4e..08c3f91 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -79,3 +79,11 @@ function limpiarLista(idDeLaLista){ } } +//ejercicio 7 + +const imagen = document.querySelector("img"); + +console.log(imagen.getAttribute("src")); +imagen.setAttribute("src", "foto2.jpg"); +imagen.setAttribute("alt", "Locro"); +console.log(imagen.getAttribute("alt")); \ No newline at end of file