1、获得选项option的值
varobj=document.getElementByIdx_x(”testSelect”);//定位id
varindex=obj.selectedIndex;//选中索引
vartext=obj.options[index].text;//选中文本
varvalue=obj.options[index].value;//选中值
2.jQuery中获得选中select值
第一种方式
$('#testSelectoption:selected').text();//选中的文本
$('#testSelectoption:selected').val();//选中的值
$("#testSelect").get(0).selectedIndex;//索引
第二种方式
$("#tesetSelect").find("option:selected").text();//选中的文本
…….val();
…….get(0).selectedIndex;
『页面特效|JavaScript』