Getting specific option tag text using jQuery.

vishalneeraj-24503
Posted by vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 284
Suppose,we have a HTML DropDownList as:-
<select id = 'ddl_option'>
<option value = '1'>Option A</option>
<option value = '2'>Option B</option>
<option value = '3'>Option C</option>
</select>


Now,to get the value,we have to write below code:-
$("#ddl_option option[value='2']").text();

Comments or Responses

Login to post response