Agrega ejercicio 2 de la clase 9

This commit is contained in:
Lucio Gaibazzi
2026-05-30 20:59:27 -03:00
parent 94cb1595d1
commit f8ec466ac7
2 changed files with 13 additions and 0 deletions

View File

@@ -9,4 +9,15 @@ const parrafo = document.querySelector("#textoContador");
boton.addEventListener("click", function(){
clicks++;
parrafo.textContent = `Botón clickeado ${clicks} veces`;
});
//Ejercicio 2 de la clase 9
const campo = document.querySelector("#texto");
const contadorCaracteres = document.querySelector("#cantidadCaracteres");
campo.addEventListener("input", function() {
contadorCaracteres.textContent = `Cantidad de caracteres: ${campo.value.length}`;
});