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
| <html><body>
Énoncé de ma question <br />
<form name="quizz">
<input type="radio" name="choix" value="choix1"/>reponse1<br/>
<input type="radio" name="choix" value="choix2"/>reponse2<br/>
<input type="button" value="Valider" onclick="tester(this.form.choix)"/>
</form><br />
<div id="text" onclick="tester();">attente de la reponse</div>
<script type="text/javaScript">
function modifierText(texte)
{ document.getElementById("text" ).innerHTML = texte; }
function tester(choix)
{
if (choix[1].checked)
{modifierText("c'est juste" );
}else{
modifierText("c'est faux." );
}
return false;
}
</script>
<!-- c'est le truc à copier qui provient de google analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'XX-00000000-0']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body></html> |
Partager