






















原生js方法:
var myselect=document.getElementById("test"); var index=myselect.selectedIndex;
var value=myselect.options[index].value;jquery方法:
var options=$("#test option:selected");
options.val();//获取value
options.text();//获取文本
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。