piffy

Contaclick

Aug 3rd, 2021
702
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="it">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Contaclick</title>
  6.   <script>
  7.     var cnt=0;
  8.     function Conta(){
  9.       cnt=parseInt(cnt)+parseInt(1);
  10.       var divData=document.getElementById("showCount");
  11.  
  12.     }
  13.     function Display() {
  14.       alert("Numero di click: "+cnt);
  15.     }
  16.   </script>
  17. </head>
  18. <body>
  19. <h1>Contaclick</h1>
  20.  
  21. <input type="button" id="btnClick" value="Cliccami" onclick="Conta()";/>
  22. <input type="button" id="btnClick1" value="Quanti ne hai fatti?" onclick="Display()";/>
  23.  
  24. </body>
  25. </html>
RAW Paste Data