feat/excersices #2

Open
saucedo.facundo wants to merge 5 commits from saucedo.facundo/clase-9-eventos:feat/excersices into main
2 changed files with 14 additions and 1 deletions
Showing only changes of commit 0b8e8b5bd7 - Show all commits

View File

@@ -1 +1,13 @@
// Agregar acá el código javascript para los ejercicios
// Ejercicio 1
const clickCounter = document.getElementById('clickCounter');
const clickButton = document.getElementById('clickButton');
let count = 0;
clickButton.addEventListener('click', () => {
count++;
clickCounter.textContent = count;
});

View File

@@ -9,7 +9,8 @@
<body>
<h1>Clase 9 - Eventos</h1>
<div id="ejercicio-1">
<!-- Agregar acá el código HTML que haga falta para el ejercicio 1 -->
<p> Este boton ha sido clickeado <span id="clickCounter">0</span> veces</p>
<button id="clickButton">Clickeame!</button>
</div>
<hr>
<div id="ejercicio-2">