Advertisement
piffy

Quiz stupido

Aug 7th, 2021
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.67 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Title</title>
  6.     <script>
  7.         var risposto=false;
  8.  
  9.         function rispondi(messaggio) {
  10.             if (risposto) return;
  11.             risposto=true;
  12.             document.getElementById("risposta").innerHTML=messaggio;
  13.         }
  14.  
  15.     </script>
  16. </head>
  17. <body>
  18.  
  19. <h1>Qual รจ il colore del cavallo bianco di Napoleone?</h1>
  20. <h3 id="risposta" >&nbsp;</h3>
  21. <p>
  22.     <button onclick="rispondi('risposta errata');">Nero</button>
  23.     <button  onclick="rispondi('risposta corretta');">Bianco</button>
  24.     <button  onclick="rispondi('risposta errata');">Pezzato</button>
  25. </p>
  26.  
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement