mercredi 14 septembre 2016

How to check if number of checked checkbox is multiply of 3 using jquery?

In my ul li tags and i want to when sumbit pressed, check if number of checked checkbox isn't muliply of 3, display alert. How i achive this?

<ul>
    <li><input type="checkbox" />a</li>
    <li><input type="checkbox" />b</li>
    <li><input type="checkbox" />c</li>
    <li><input type="checkbox" />d</li>
    <li><input type="checkbox" />e</li>
    <li><input type="checkbox" />f</li>
</ul>
<input type="submit" value="go" />




Aucun commentaire:

Enregistrer un commentaire