JavaScript获取Select当前值写法: var value = document.getElementById("select").options[document.getElementById("select").options.selectedIndex].value; var text = document.getElementById("select").options[document.getElementById("select").options.selectedIndex].text;
例子: 代码如下:
function check() { var select = document.getElementById("select").options[document.getElementById("select").options.selectedIndex].value; alert(select); } script>