阅读:3329 次 编辑日期:2015-12-21
var myselect=document.getElementById("uw3c"); //获取select对象的ID: var index=myselect.selectedIndex; //获取选中项的索引 myselect.options[index].value; //获取选中项options的value myselect.options[index].text; //获取选中项options的text 或通过如下方法获取选中的值 var opVal = document.getElementById("uw3c").value;
var options = $("#uw3c option:selected"); alert(options.val()); alert(options.text());