forked from marquez.juan/clase-9-eventos
Finish exercise 3
This commit is contained in:
10
clase-9.js
10
clase-9.js
@@ -17,3 +17,13 @@ const parrafoCaracter = document.getElementById("carac0");
|
|||||||
textoCaracter.addEventListener("input", () => {
|
textoCaracter.addEventListener("input", () => {
|
||||||
parrafoCaracter.textContent = "Cantidad de caracteres: " + textoCaracter.value.length
|
parrafoCaracter.textContent = "Cantidad de caracteres: " + textoCaracter.value.length
|
||||||
}) // Ejercicio 2
|
}) // Ejercicio 2
|
||||||
|
|
||||||
|
|
||||||
|
const listaEvent = document.getElementById("itemListas");
|
||||||
|
listaEvent.addEventListener("click",(e) => {
|
||||||
|
if (e.target.tagName == "LI") {
|
||||||
|
console.log(e.target.textContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user