Does anyone know how can I set the selected value for dropdown based on the display value in jquery/javascript
Example:
<select id='test'>
<option value='sgf'>One</option>
<option value='sdf'>Two</option>
<option value='gfr'>Three</option>
<option value='dfg'>Four</option>
</select>
How Can I set the selected to value based on the display value? Let say, I want to set the selected when display value is 'Three'