Operate the HTML's select object

var select = document.getElementById("selectID");

var optionValue = select.options[select.selectedIndex].value;

var optionText = select.options[select.selectedIndex].text;




你可能感兴趣的:(Operate the HTML's select object)