From 43d20f2ac574c64d3a81da9d51ec9f18f1844a76 Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Sat, 23 May 2026 20:03:47 -0300 Subject: [PATCH] ej1 terminado --- clase-9.js | 12 +++++++++++- index.html | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/clase-9.js b/clase-9.js index 6df1007..4a3d9a4 100644 --- a/clase-9.js +++ b/clase-9.js @@ -1 +1,11 @@ -// Agregar acá el código javascript para los ejercicios +1// +const botonContador = document.getElementById("contador-btn"); +const parrafoContador = document.getElementById("contador-parrafo"); +let contador = 0; + +botonContador.addEventListener("click", () => { + contador += 1; + parrafoContador.textContent = `Botón clickeado ${contador} veces.`; +}); + +2// diff --git a/index.html b/index.html index 2a6b85f..8211f43 100644 --- a/index.html +++ b/index.html @@ -9,11 +9,13 @@

Clase 9 - Eventos

- + +

Botón clickeado 0 veces.


+