I m realy new to javascript and html. In a problem i got asked to create a function to show an alert if the player checks more or less than 3 checkboxes and also and also calculates his score in the game and show an alert if he has more than 15 points or less here is the html
<form name="form">
<input type="checkbox" name="choix" value="-8" /> Case 1 <br/>
<input type="checkbox" name="choix" value="5" /> Case 2 <br/>
<input type="checkbox" name="choix" value="3" /> Case 3 <br/>
<input type="checkbox" name="choix" value="10" /> Case 4 <br/>
<input type="checkbox" name="choix" value="0" /> Case 5 <br/>
<input type="checkbox" name="choix" value="-1" /> Case 6 <br/>
<input type="checkbox" name="choix" value="-7" /> Case 7 <br/>
<input type="checkbox" name="choix" value="15" /> Case 8 <br/>
<input type="checkbox" name="choix" value="8" /> Case 9 <br/>
<input type="checkbox" name="choix" value="3" /> Case 10 <br/>
<input type="button" value="Calculer le score du jeu" onClick="CalculScore()"/>
</form>
<input type="text" value="" name="resultat" disabled/>
Aucun commentaire:
Enregistrer un commentaire