1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
| <html>
<head>
<script language="JavaScript">
<!--// hide
// initialisation des variables : les réponses sont un tableau "re" de 20 valeurs, les questions faites un tableau "faite"
// mise à zéro du score
var rep = new Array
var faite = new Array
var score = 0;
// initialisation des bonnes réponses
rep[1] = "c";
rep[2] = "a";
rep[3] = "c";
rep[4] = "b";
rep[5] = "b";
rep[6] = "c";
rep[7] = "b";
rep[8] = "c";
rep[9] = "a";
rep[10] = "d";
rep[11] = "c";
rep[12] = "a";
rep[13] = "c";
rep[14] = "c";
rep[15] = "a";
rep[16] = "c";
rep[17] = "b";
rep[18] = "c";
rep[19] = "a";
rep[20] = "d";
// les parties en bleu apparaissent en commentaire, elles peuvent être modifiées
// la fonction "engine" vérifie si la réponse est bonne ("question" est le numéro de la question,
// "reponse" est la réponse de l'utilisateur, il a un point de plus si elle est bonne, - 1 s'il a déjà répondu.
function truc(){
alert("c'est un point de vue");
}
function Engine(question, reponse) {
if (reponse != rep[question]) {
if (!faite[question]) {
faite[question] = -1;
alert("Faux !! La bonne réponse était en - " + rep[question] + " -");
}
else {
alert("Tu as déjà répondu à cette question !");
}
}
else {
if (!faite[question]) {
faite[question] = -1;
score++;
alert("Bonne réponse !! ");
}
else {
alert("Tu as déjà répondu à cette question !");
}
}
}
// commentaires pour le résultat final
function NextLevel () {
if (score > 10) {
alert("Tricheur !");
}
if (score > 8 && score <= 10) {
alert(score + "/20. " + "Un coup de maître !");
}
if (score > 6 && score <= 8) {
alert(score + "/20. " + "Bien, mais... pas parfait.");
}
if (score >= 4 && score < 6) {
alert(score + "/20. " + "Pas terrible... un autre essai ?");
}
if (score < 4) {
alert(score + "/20. " + "Il faut refaire l'exercice");
}
// (mais indiquez la méthode dans la balise du formulaire) :
// document.quest.submit()
// ligne qui suit pour vider le formulaire :
//faite = new Array;
//score = 0;
//ligne suivante à désactiver si IE3 ou -
document.quest.reset();
}
-->
</script>
</head>
<body>
<div align="center">
<h1>QCM Television</h1>
<br><br>
<TABLE BORDER=0>
<TR>
<TD>Nom</TD>
<TD>
<INPUT type=text name="nom">
</TD>
</TR>
<TR>
<TD>Prénom</TD>
<TD>
<INPUT type=text name="prenom">
</TD>
</TR>
<TR>
<TD>Date</TD>
<TD>
<INPUT type=text name="date">
</TD>
</TR>
</TABLE>
</div>
<hr>
<form name="qcm television">
<br><form name="quest">
<p> Question 1 :
<br>1 pouce en cm est égal a ?
<br>
<br><input type=radio name="1" value="a" onclick="Engine(1, this.value)"><font color="#FF0000">a.
</font><font color="#330033">1,58cm</font>
<br><input type="radio" name="1" value="b" onclick="Engine(1, this.value)"><font color="#FF0000">b.
</font><font color="#330033">2,17cm</font>
<br><input type="radio" name="1" value="c" onclick="Engine(1, this.value)"><font color="#FF0000">c.
</font><font color="#330033">2,54cm</font>
<br><input type="radio" name="1" value="d" onclick="Engine(1, this.value)"><font color="#FF0000">d.
</font><font color="#330033">2,74cm</font>
<br>
<p> Question 2 :
<br>Que signifie 1080p ?
<br>
<br><input type=radio name="2" value="a" onclick="Engine(2, this.value)"><font color="#FF0000">a.
</font><font color="#330033">1920x1080</font>
<br><input type="radio" name="2" value="b" onclick="Engine(2, this.value)"><font color="#FF0000">b.
</font><font color="#330033">1080x720</font>
<br><input type="radio" name="2" value="c" onclick="Engine(2, this.value)"><font color="#FF0000">c.
</font><font color="#330033">1920x720</font>
<br><input type="radio" name="2" value="d" onclick="Engine(2, this.value)"><font color="#FF0000">c.
</font><font color="#330033">1080x1920</font>
<br>
<p> Question 3 :
<br>Combien y a t'il de sous pixel dans un pixel ?
<br>
<br><input type=radio name="3" value="a" onclick="Engine(3, this.value)"><font color="#FF0000">a.
</font><font color="#330033">1</font>
<br><input type="radio" name="3" value="b" onclick="Engine(3, this.value)"><font color="#FF0000">b.
</font><font color="#330033">2</font>
<br><input type="radio" name="3" value="c" onclick="Engine(3, this.value)"><font color="#FF0000">c.
</font><font color="#330033">3</font>
<br><input type="radio" name="3" value="d" onclick="Engine(3, this.value)"><font color="#FF0000">d.
</font><font color="#330033">4</font>
<br>
<p> Question 4 :
<br>A quoi correspond la fréquence ?
<br>
<br><input type=radio name="4" value="a" onclick="Engine(4, this.value)"><font color="#FF0000">a.
</font><font color="#330033">le nombre d'image par heure</font>
<br><input type="radio" name="4" value="b" onclick="Engine(4, this.value)"><font color="#FF0000">b.
</font><font color="#330033">le nombre de fois où un signal est traité par seconde</font>
<br><input type="radio" name="4" value="c" onclick="Engine(4, this.value)"><font color="#FF0000">c.
</font><font color="#330033">le nombre d'image par minute</font>
<br><input type="radio" name="4" value="d" onclick="Engine(4, this.value)"><font color="#FF0000">d.
</font><font color="#330033">le nombre de fois où un signal s'accélère par seconde</font>
<br>
<p> Question 5 :
<br>A quoi correspond la fréquence ?
<br>
<br><input type=radio name="5" value="a" onclick="Engine(5, this.value)"><font color="#FF0000">a.
</font><font color="#330033">l'éclairage interne</font>
<br><input type="radio" name="5" value="b" onclick="Engine(5, this.value)"><font color="#FF0000">b.
</font><font color="#330033">le taux de rafraichissement</font>
<br><input type="radio" name="5" value="c" onclick="Engine(5, this.value)"><font color="#FF0000">c.
</font><font color="#330033">la différence de rapidité de balayge d'une image</font>
<br><input type="radio" name="5" value="d" onclick="Engine(5, this.value)"><font color="#FF0000">d.
</font><font color="#330033">la différence de luminosité entre l'image la plus sombre et la plus claire</font>
<br>
<p><input type="button" name="Resultats" value="Resultats" onclick="NextLevel()">
<br>
<p></form>
</form>
<hr>
</body>
</html> |
Partager