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 1/4] 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.


+

-- 2.49.1 From fc768f3aa0eb63b9a30e38921461dcd8d3ec74c7 Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Tue, 26 May 2026 18:51:50 -0300 Subject: [PATCH 2/4] EJ3 terminado --- clase-9.js | 8 ++++++++ index.html | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/clase-9.js b/clase-9.js index 4a3d9a4..f4c308a 100644 --- a/clase-9.js +++ b/clase-9.js @@ -1,4 +1,5 @@ 1// + const botonContador = document.getElementById("contador-btn"); const parrafoContador = document.getElementById("contador-parrafo"); let contador = 0; @@ -9,3 +10,10 @@ botonContador.addEventListener("click", () => { }); 2// +const cajaTexto = document.getElementById("text-cont"); +const conatdorLetras = document.getElementById("contador-text") +let Letras = 0; +cajaTexto.addEventListener("input", () => { + Letras += 1; + conatdorLetras.textContent = `Letras escritas = ${Letras} `; +}); \ No newline at end of file diff --git a/index.html b/index.html index 8211f43..906a392 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,8 @@
- + +

Letras escritas = 0


-- 2.49.1 From 62a45024437facf4c21e45212837bc07c539e73f Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Thu, 28 May 2026 19:29:47 -0300 Subject: [PATCH 3/4] (ej3) terminado --- clase-9.js | 13 +++++++++++++ estilo.css | 3 +++ index.html | 8 +++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/clase-9.js b/clase-9.js index f4c308a..adcaf14 100644 --- a/clase-9.js +++ b/clase-9.js @@ -16,4 +16,17 @@ let Letras = 0; cajaTexto.addEventListener("input", () => { Letras += 1; conatdorLetras.textContent = `Letras escritas = ${Letras} `; +}); + +3// +const lista = document.getElementById("ListaMarcasExoticas"); +lista.addEventListener("click", function(evento) { + if (evento.target.tagName ==="LI") { + const itemPrevio = lista.querySelector(".seleccionado"); + if (itemPrevio) { + itemPrevio.classList.remove("seleccionado"); + } + evento.target.classList.add("seleccionado"); + + } }); \ No newline at end of file diff --git a/estilo.css b/estilo.css index 19d93f8..eb182bf 100644 --- a/estilo.css +++ b/estilo.css @@ -3,3 +3,6 @@ div { padding: 10px; margin: 10px; } +.seleccionado{ + background-color:blue; +} \ No newline at end of file diff --git a/index.html b/index.html index 906a392..f06dc49 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,13 @@
-
+
-- 2.49.1 From eede996d1658830918a9759b451832a25704ffd2 Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Thu, 28 May 2026 21:41:35 -0300 Subject: [PATCH 4/4] EJ4 terminado --- clase-9.js | 21 +++++++++++++++++++++ index.html | 11 +++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/clase-9.js b/clase-9.js index adcaf14..6976157 100644 --- a/clase-9.js +++ b/clase-9.js @@ -29,4 +29,25 @@ lista.addEventListener("click", function(evento) { evento.target.classList.add("seleccionado"); } +}); + +4// +document.querySelector("#externo").addEventListener("click", () => { + console.log("externo"); +}); +document.querySelector("#interno").addEventListener("click", () => { + console.log("interno"); +}); +document.querySelector("#boton").addEventListener("click", () => { + console.log("boton"); +}); + +document.querySelector("#externo2").addEventListener("click", () => { + console.log("externo / capturing"); +}, true); +document.querySelector("#interno2").addEventListener("click", () => { + console.log("interno"); +}); +document.querySelector("#boton2").addEventListener("click", () => { + console.log("boton"); }); \ No newline at end of file diff --git a/index.html b/index.html index f06dc49..85581d8 100644 --- a/index.html +++ b/index.html @@ -29,8 +29,15 @@
  • Maseati

  • -
    - +
    +
    + +
    +
    +
    +
    + +

    -- 2.49.1