From 94cb1595d1685de933619d3d7c897423fa1e8cfd Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sat, 30 May 2026 20:29:41 -0300 Subject: [PATCH] Agrega ejercicio 1 de la clase 9 --- clase-9.js | 11 +++++++++++ index.html | 2 ++ 2 files changed, 13 insertions(+) diff --git a/clase-9.js b/clase-9.js index 6df1007..83dca61 100644 --- a/clase-9.js +++ b/clase-9.js @@ -1 +1,12 @@ // Agregar acá el código javascript para los ejercicios + +//Ejercicio 1 de la clase 9 + +let clicks = 0; +const boton = document.querySelector("#botonEjc1"); +const parrafo = document.querySelector("#textoContador"); + +boton.addEventListener("click", function(){ + clicks++; + parrafo.textContent = `Botón clickeado ${clicks} veces`; +}); \ No newline at end of file diff --git a/index.html b/index.html index 2a6b85f..003ccda 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,8 @@

Clase 9 - Eventos

+ +

Botón clickeado 0 veces