Notes Notes - notes.io Popular notes QUIZ CON RISPOSTE ESATTE COME ARRAY HTML <html> <body> <h1> Quiz </h1> <ol> <li> <div id="bor"> <h3> Qual e' la capitale della Francia? </h3> </div> </li> <p> <button onclick="quiz(true,'d1')"> Parigi </button> <p> <button onclick="quiz('Nizza','r1')"> Nizza </button> </p> <p> <button onclick="quiz('Lione','r1')"> Lione </button> </p> <p> <button onclick="quiz('Strasburgo','r1')"> Strasburgo </button> </p> <br> <p id="x1"> </p> <li> <div id="bor"> <h3> Qual e' la capitale dell'Albania? </h3> </div> </li> <p> <button onclick="quiz(true,'d2')"> Tirana </button> </p> <p> <button onclick="quiz('Benevento','r2')"> Benevento </button> </p> <p> <button onclick="quiz('Tokyo','r2')"> Tokyo </button> </p> <p> <button onclick="quiz('Brescia','r2')"> Brescia </button> </p> <br> <p id="x2"> </p> <li> <div id="bor"> <h3> Qual e' la capitale del Belgio? </h3> </div> </li> <p> <button onclick="quiz(true,'d3')"> Bruxelles </button> </p> <p> <button onclick="quiz('Catania','r3')"> Catania </button> </p> <p> <button onclick="quiz('Napoli','r3')"> Napoli </button> </p> <p> <button onclick="quiz('Firenze','r3')"> Firenze </button> </p> <br> <p id="x3"> </p> <li> <div id="bor"> <h3> Qual e' la capitale della Croazia? </h3> </div> </li> <p> <button onclick="quiz(true,'d4')"> Zagabria </button> </p> <p> <button onclick="quiz('Berlino','r4')"> Berlino </button> </p> <p> <button onclick="quiz('Bucarest','r4')"> Bucarest </button> </p> <p> <button onclick="quiz('Madrid','r4')"> Madrid </button> </p> <br> <p id="x4"> </p> <li> <div id="bor"> <h3> Qual e' la capitale della Grecia? </h3> </div> </li> <p> <button onclick="quiz(true,'d5')"> Atene </button> </p> <p> <button onclick="quiz('Padova','r5')"> Padova </button> </p> <p> <button onclick="quiz('Gubbio','r5')"> Gubbio </button> </p> <p> <button onclick="quiz('Mantova','r5')"> Mantova </button> </p> <br> <p id="x5"> </p> </ol> <p> Hai totalizzato : <button onclick="risultato()"> CLICCAMI </button> </p> <p id="vuoto1"> </p> punti su 5 </body> </html> --- CSS h1 { font-size:50; color:red; font-family:fantasy; border:solid 3px aqua; display:inline-block; } #bor { border:solid 2px brown; display:inline-block; } body { text-align:center; } ---- JAVASCRIPT const rispEs = ["Parigi","Tirana","Bruxelles","Zagabria","Atene"] var contatore = 0 function quiz (a,b) { if (a==true &&b=='d1') { document.getElementById("x1").innerHTML = rispEs[0] + " e' esatto!!!"; contatore++ } else if (a==true &&b=='d2') { document.getElementById("x2").innerHTML = rispEs[1] + " e' esatto!!!"; contatore++ } else if (a==true &&b=='d3') { document.getElementById("x3").innerHTML = rispEs[2] + " e' esatto!!!"; contatore++ } else if (a==true &&b=='d4') { document.getElementById("x4").innerHTML = rispEs[3] + " e' esatto!!!"; contatore++ } else if (a==true &&b=='d5') { document.getElementById("x5").innerHTML = rispEs[4] + " e' esatto!!!"; contatore++ } else if (b=='r1') { document.getElementById("x1").innerHTML = a + " e' sbagliato," + " la risposta corretta era " + rispEs[0]; } else if (b=='r2') { document.getElementById("x2").innerHTML = a + " e' sbagliato," + "la risposta corretta era " + rispEs[1]; } else if (b=='r3') { document.getElementById("x3").innerHTML = a + " e' sbagliato," + "la risposta corretta era " + rispEs[2]; } else if (b=='r4') { document.getElementById("x4").innerHTML = a + " e' sbagliato," + "la risposta corretta era " + rispEs[3]; } else if (b=='r5') { document.getElementById("x5").innerHTML = a + " e' sbagliato," + "la risposta corretta era " + rispEs[4]; } } function risultato () { document.getElementById("vuoto1").innerHTML = contatore; } Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing... With notes.io; * You can take a note from anywhere and any device with internet connection. * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.). * You can quickly share your contents without website, blog and e-mail. * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal). * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link. Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive. Easy: Notes.io doesn’t require installation. Just write and share note! Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q ) Free: Notes.io works for 12 years and has been free since the day it was started. You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels; Email: [email protected] Twitter: http://twitter.com/notesio Instagram: http://instagram.com/notes.io Facebook: http://facebook.com/notesio Regards; Notes.io Team Shortened Note Link Long File For written notes was greater than 18KB Unable to shorten. To be smaller than 18KB, please organize your notes, or sign in.
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards; Notes.io Team
For written notes was greater than 18KB Unable to shorten.
To be smaller than 18KB, please organize your notes, or sign in.