Recherche à savoir combien de input de type checkbox est contenu dans un fieldset
Bonjour,
J'aurais besoin d'aide....j'essaye de récupérer le nombre de checkbox contenu dans un fieldset de mon formulaire.
Voici mon code du formulaire:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <fieldset class="step" >
<input type="checkbox" name="1_1" id="checkbox1_reponse" style="width:20px"/> <label for="1">1</label><br />
<input type="checkbox" name="1_2" id="checkbox2_reponse" style="width:20px"/> <label for="2">2</label><br />
<input type="checkbox" name="1_3" id="checkbox3_reponse" style="width:20px"/> <label for="3">3</label><br />
<input type="checkbox" name="1_4" id="checkbox4_reponse" style="width:20px"/> <label for="4">4</label><br />
<input type="checkbox" name="1_5" id="checkbox5_reponse" style="width:20px"/> <label for="5">5</label>
</fieldset>
<fieldset class="step">
<input type="checkbox" name="2_6" id="checkbox6_reponse" style="width:20px"/> <label for="6">1</label><br />
<input type="checkbox" name="2_7" id="checkbox7_reponse" style="width:20px"/> <label for="7">2</label><br />
<input type="checkbox" name="2_8" id="checkbox8_reponse" style="width:20px"/> <label for="8">Gastro-3</label><br />
<input type="checkbox" name="2_9" id="checkbox9_reponse" style="width:20px"/> <label for="9">4</label><br />
<input type="checkbox" name="2_10" id="checkbox10_reponse" style="width:20px"/> <label for="10">5</label><br />
<input type="checkbox" name="2_11" id="checkbox11_reponse" style="width:20px"/> <label for="11">6</label><br />
<input type="checkbox" name="2_12" id="checkbox12_reponse" style="width:20px;margin-top:5px"/> <label for="12">7</label> <input type="email" name="autre" id="autre" style="height:10px;"/><br />
</fieldset> |
Merci pour votre aide