<select id="drpControl"> <option value="1">Mr</option> <option value="2">Mrs</option> <option selected="true" value="3">Ms</option> <option value="4">Dr</option> <option value="5">Prof</option> </select>
If you want to get the selected string "Ms", you would do that in the following way:
$("#drpControl option:selected").text(); // returns Ms
If you want to get the selected value of "Ms", you would do that in the following way:
$("#drpControl option:selected").Val(); // returns 3
Such an ideal piece of blog. It’s quite interesting to read content like this. I appreciate your blog
ReplyDeleteThanks for sharing this information! I totally agree with you. Your information is very interesting and important. I really like this information.