ZadomenSC

Untitled

Nov 18th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const button = document.getElementById("boton")
  2. const button2 = document.getElementById("boton2")
  3. let anotacion = document.querySelector('anotacion')
  4. let anotacion2 = document.querySelector('anotacion2')
  5. let contador = 0;
  6. let contador2 = 0;
  7. boton.addEventListener("click", () => {
  8.  
  9.     contador++;
  10.     anotacion.textContent = contador;
  11. })
  12. boton2.addEventListener("click", () => {
  13.  
  14.     contador2++;
  15.     anotacion2.textContent = contador2;
  16. });
  17.  
Tags: contador
Advertisement
Add Comment
Please, Sign In to add comment