JavaScript取DOM中下拉框的选中值

var name = document.getElementById("name").options[document.getElementById("name").selectedIndex].text;
var id = document.getElementById("id").options[document.getElementById("id").selectedIndex].value;
原文地址:https://www.cnblogs.com/Cratical/p/1806786.html