mercredi 13 juillet 2016

select a Select option by text with javascript


I have a select box and one string and i would select a option by string. For example string="Volvo" and select box like this:

 <select>
  <option value="v1">Volvo</option>
  <option value="v2">Saab</option>
  <option value="v3">Mercedes</option>
  <option value="v4">Audi</option>
</select> 

Can anyone help me please?


Aucun commentaire:

Enregistrer un commentaire