Resolucion del 2do ejercicio
This commit is contained in:
@@ -9,4 +9,10 @@ const item = document.querySelectorAll("ul li");
|
||||
for (const i of item) {
|
||||
console.log(i.textContent);
|
||||
}
|
||||
item.classList.push("item-lista");
|
||||
|
||||
function agregarItem() {
|
||||
const item = document.querySelectorAll("ul li");
|
||||
for (const i of item) {
|
||||
i.classList.add("item-lista");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,3 +176,7 @@ h1 {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-lista {
|
||||
color: red;
|
||||
}
|
||||
Reference in New Issue
Block a user