Clase 8-Manipulacion del DOM-Bruno TL #1
@@ -10,9 +10,20 @@ for (const i of item) {
|
||||
console.log(i.textContent);
|
||||
}
|
||||
|
||||
|
||||
function itemLista() {
|
||||
const item = document.querySelectorAll("ul li");
|
||||
for (const i of item) {
|
||||
i.classList.add("item-lista");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function agregarItem() {
|
||||
const listaInicial = document.querySelector("#lista-inicial");
|
||||
for (const l of listaInicial) {
|
||||
const nuevoElemento = document.createElement("li");
|
||||
}
|
||||
return(nuevoElemento)
|
||||
}
|
||||
Reference in New Issue
Block a user