samedi 23 décembre 2017

How can i make "checkboxes" that increase their number at each left click and decrease at right click?

I'm currently using a form with imaged checkboxes :

<form action="submit.php" method="POST">  
<table cellspacing="15">
<tr>
<td>
  <label for="lightning"><img src="units/lightning.png"/></label>
  <input type="checkbox" name="lightning" id="lightning">
</td>
<td>
  <label for="delita"><img src="units/delita.png"/></label>
  <input type="checkbox" name="delita" id="delita">
</td>
<td>

(it goes further down for a while, didn't paste everything)

it's a basic checkbox, but what i want is something that stacks numbers the more you click. For exemple, let's say i click once on the checkbox with my left click : it will check it and a "1" will appear above. If two times, a 2 etc...and with the right click it would decrease that said number. Is it possible in any form?

Thank you for your time.




Aucun commentaire:

Enregistrer un commentaire