mercredi 4 février 2015

Change price based on selection


I would like to use javascript to change the price field value based on a selection. Would I use If ELSE? I would like to be something like if selection is banana the price is 1 but if the selection is apple the price is 2. Thanks.



<select id="mySelect" size="4">
<option>Apple</option>
<option>Orange</option>
<option>Pineapple</option>
<option>Banana</option>
</select>




Aucun commentaire:

Enregistrer un commentaire