diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index cedb6ec..2ce67be 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -104,4 +104,13 @@ function limpiarLista(idLista) { for (const item of items) { item.remove(); } +} +// 7 + +function cambiarImagen() { + const imagen = document.querySelector("#foto"); + + imagen.setAttribute("src", "foto2.jpg"); + + imagen.setAttribute("alt", "Locro"); } \ No newline at end of file