Possible Duplicate:
Getting the value of the selected option tag in a select box
对于选择框,如何在 jQuery 中获取所选项目的值和文本?
例如,
<option value="value">text</option>
最佳答案
<select id="ddlViewBy">
<option value="value">text</option>
</select>
JQuery
var txt = $("#ddlViewBy option:selected").text();
var val = $("#ddlViewBy option:selected").val();
<强> JS Fiddle DEMO
关于jquery - 在 jQuery 中获取 SELECT 的值和文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12614308/