i have scenerio where based on a padrticular value of some drop down , a specific set of attributes take action as in below example.i am using jsp and javascript
<td width="20%"><select type="text" name="cars" style='WIDTH:428'
<option value="" selected>Select</option>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select></td></tr>
based on the above selected option i want to choose like this
if (mercedes)
<td ><input type="text" name="mercedes"
onchange="javascript:onefunction();"></td>
else
<td ><input type="text" name="othercars"
onchange="javascript: otherfunction();"></td>
please help?
Aucun commentaire:
Enregistrer un commentaire