samedi 25 avril 2015

Dynamically show text depending on form result


I've got a simple form, which looks like this:

Team 1
<input type='button' value='-' class='qtyminus' field='quantity' />
<input type='text' name='quantity' value='0' class='qty' readonly />
<input type='button' value='+' class='qtyplus' field='quantity' />

Team 2
<input type='button' value='-' class='qtyminus' field='quantity2' />
<input type='text' name='quantity2' value='0' class='qty' readonly />
<input type='button' value='+' class='qtyplus' field='quantity2' />

enter image description here

When one of Teams has set number 3 I want to appear that team's name dynamically below. Something like "Team1/Team 2 is the winner!". And when I change the number next to the name of team, I want the text "Team1/Team2 is the winner!" to disappear.


Aucun commentaire:

Enregistrer un commentaire