forked from marquez.juan/clase-8-DOM
Ejercicio 3 resuelto
This commit is contained in:
@@ -11,3 +11,12 @@ function agregarLista() {
|
||||
item.classList.add("resaltada");
|
||||
}
|
||||
}
|
||||
|
||||
const lista = document.querySelector("ul");
|
||||
|
||||
function agregarItem(){
|
||||
const nuevoItem = document.createElement("li");
|
||||
let itemAgregado = prompt("Ingresa un nuevo item");
|
||||
nuevoItem.textContent = itemAgregado;
|
||||
lista.appendChild(nuevoItem);
|
||||
}
|
||||
Reference in New Issue
Block a user