I have two classes of checkboxes (.a and .b). When an .a checkbox is clicked, I want one to be added to my js variable (a) and when a .b is clicked I want one to be added to my js variable (b). How would I do this using javascript? My HTML:
<input type = "checkbox" class="a" onclick="a()"> a <br>
<input type="checkbox" class="b" onclick="b()"> b <br>
Aucun commentaire:
Enregistrer un commentaire