vendredi 6 septembre 2019

If checkbox "A" and "C" is checked make checkbox "B" checked to

Hi there i have a problem and dont know if there's a nice solution to do that.

<input type="checkbox" name="a" value="a">a<br>
<input type="checkbox" name="b" value="b">b<br>
<input type="checkbox" name="c" value="c">c<br>
<input type="checkbox" name="d" value="c">d<br>
<input type="checkbox" name="e" value="c">e<br>

I like to make it work more as a "range" so if a user click "a" and then "d" everything between that will be selected to.

I can make if statements with all the scenarios but maybe there's a better way to do that?

thanks




Aucun commentaire:

Enregistrer un commentaire