Clase 8 ejercicio DOM #8
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user