复制代码 代码如下:
var sel=document.getElementById(id);//select元素的id
var index=sel.selectedIndex;//获取被选中的option的索引
var textsel= sel.options[index].text;//获取相应的option的内容
var sel=document.getElementById(id);//select元素的id
var index=sel.selectedIndex;//获取被选中的option的索引
var textsel= sel.options[index].text;//获取相应的option的内容