html:
<select id="resultList"> <option >1班</option> <option >2班</option> <option >3班</option> </select>
js:
var mySelect = document.getElementById("resultList"); var mySelectText = mySelect.options[mySelect.selectedIndex].text;
html:
<select id="resultList"> <option >1班</option> <option >2班</option> <option >3班</option> </select>
js:
var mySelect = document.getElementById("resultList"); var mySelectText = mySelect.options[mySelect.selectedIndex].text;
转载于:https://www.cnblogs.com/guohuiru/p/3225513.html