»
AnglaisFran�aisVietnamien

Imprimer - Remplissez-en Quiz - JavaScriptBank.com

Version compl�te: jsB@nk » Utilitaire » Quiz » Remplissez-en Quiz
URL: https://www.javascriptbank.com/fill-n-quiz.html

Remplissez-en Quiz © JavaScriptBank.comUtilisez cette JavaScript créer votre propre quiz.

Version compl�te: jsB@nk » Utilitaire » Quiz » Remplissez-en Quiz
URL: https://www.javascriptbank.com/fill-n-quiz.html



JavaScript
<SCRIPT language=JavaScript>function scoreme() {<!-- Script made by Scott Campbell  [email protected] --><!--var total=5;// Total number of Questions in Quizvar correct=0;// Counter for number of Question correct// 1st Question Code  (Take Note of the **01 !!) sv01 = document.Fx01.NM1.value.toUpperCase(); st01 = document.Fx01.NM2.value.toUpperCase(); if(sv01==st01) { document.Fx01.ovr01.value="Y"; correct=correct+1; } else { document.Fx01.ovr01.value="NO"; }// 2nd Qustion Code  (Take Note of the **02 !!) sv02 = document.Fx02.NM1.value.toUpperCase(); st02 = document.Fx02.NM2.value.toUpperCase(); if(sv02==st02) { document.Fx02.ovr02.value="Y"; correct=correct+1; } else { document.Fx02.ovr02.value="NO"; }// 3rd Qustion Code  (Take Note of the **03 !!) sv03 = document.Fx03.NM1.value.toUpperCase(); st03 = document.Fx03.NM2.value.toUpperCase(); if(sv03==st03) { document.Fx03.ovr03.value="Y"; correct=correct+1; } else { document.Fx03.ovr03.value="NO"; } sv04 = document.Fx04.NM1.value.toUpperCase(); st04 = document.Fx04.NM2.value.toUpperCase(); if(sv04==st04) { document.Fx04.ovr04.value="Y"; correct=correct+1; } else { document.Fx04.ovr04.value="NO"; } sv05 = document.Fx05.NM1.value.toUpperCase(); st05 = document.Fx05.NM2.value.toUpperCase(); if(sv05==st05) { document.Fx05.ovr05.value="Y"; correct=correct+1; } else { document.Fx05.ovr05.value="NO"; }document.FXXX.CRX.value=correct;document.FXXX.CpX.value=correct/total*100;}--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM name=Fx01><INPUT size=3 name=ovr01> 01) What color is the <B>blue</B> sky <INPUT type=hidden value=blue name=NM1><BR>&nbsp; <!-- Correct Answer for 1st Question --><INPUT size=15 value="Answer Here" name=NM2> <!-- INPUT BOX FOR ANSWER --></FORM><BR><FORM name=Fx02><INPUT size=3 name=ovr02> 02) What color is the <B>green</B> grass? <INPUT type=hidden value=green name=NM1><BR>&nbsp; <!-- Correct Answer for 2nd Question --><INPUT size=15 name=NM2> <!-- INPUT BOX FOR ANSWER (TAKE NOTE OF THE VALUE!) --></FORM><BR><FORM name=Fx03><INPUT size=3 name=ovr03> 03) What color is the <B>white</B> cloud? <INPUT type=hidden value=white name=NM1><BR>&nbsp; <!-- Correct Answer for 3rd Question --><INPUT size=15 name=NM2> </FORM><BR><FORM name=Fx04><INPUT size=3 name=ovr04> 04) What color is the <B>yellow</B> sun? <INPUT type=hidden value=yellow name=NM1><BR>&nbsp; <!-- Correct Answer for 4th Question --><INPUT size=15 name=NM2> </FORM><BR><FORM name=Fx05><INPUT size=3 name=ovr05> 05 ) What color is the <B>red</B> car <INPUT type=hidden value=red name=NM1><BR>&nbsp; <!-- Correct Answer for 5th Question --><INPUT size=15 name=NM2> </FORM><BR><FORM name=FXXX><INPUT onclick=scoreme() type=button value=check name=check>&nbsp;&nbsp; <INPUT size=2 name=CRX> out of 05.<BR>Or you got <INPUT size=3 name=CpX>% correct. </FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->