标签:style c class blog code java
1 <select id="myselect"> 2 <option value="1">Mr</option> 3 <option value="2">Mrs</option> 4 <option value="3">Ms</option> 5 <option value="4">Dr</option> 6 <option value="5">Prof</option> 7 </select>
1, get value:
$( "#myselect" ).val();
//=> 1
2, get (inner)text:
$( "#myselect option:selected" ).text();
// => "Mr"
ref: How do I get the text value of a selected option?
get the text value of a selected option.,布布扣,bubuko.com
get the text value of a selected option.
标签:style c class blog code java
原文地址:http://www.cnblogs.com/listened/p/3736027.html