mercredi 24 février 2016

Validation of checkboxes with the same name [duplicate]

This question already has an answer here:

I need to show an error if none of the below checkboxes are checked using using JavaScript.

<tr>
  <td>Status</td>
  <td colspan="3">
    <input type="checkbox" name="chk_stat[]" value="single" id="chk_stat">single

    <input type="checkbox" name="chk_stat[]" value="married" id="chk_stat">Married

    <input type="checkbox" name="chk_stat[]" value="divorcee" id="chk_stat">Divorcee

    <input type="checkbox" name="chk_stat[]" value="student" id="chk_stat">Student
  </td>
</tr>



Aucun commentaire:

Enregistrer un commentaire