js获取select标签选中的值 var obj = document.getElementById(”testSelect”); var index = obj.selectedIndex; var text = obj.options[index].text; var value = obj.options[index].value; jQuery中获得选中select值 $('#testSelect option:selected').text();//文本 $('#testSelect'
javascript获取select 的id与值 <script type="text/javascript"> function showOptionId () { var type = document.getElementById ("select"); //获取select var typeId = type.options [type.selectedIndex].id; //获取option的ID var typeValue = type.o