forked from marquez.juan/clase-8-DOM
feat: add changeImage function to update image source and alt text
This commit is contained in:
@@ -69,3 +69,10 @@ const cleanList = (id) => {
|
||||
list.removeChild(list.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
// Ejercicio 7
|
||||
|
||||
const changeImage = () => {
|
||||
const image = document.querySelector('img');
|
||||
image.src = "foto2.jpg";
|
||||
image.alt = 'Locro';}
|
||||
Reference in New Issue
Block a user