js
选项一 选项二
function gradeChange() { var myselect = document.getElementById("pid"); var index=myselect.selectedIndex; // selectedIndex代表的是你所选中项的index var value = myselect.options[index].value; console.log(value); }
jquery
<select id="select" > <option value="op1">option1</option> <option value="op2">option2</option> <option value="op3">option3</option> <option value="op4">option4</option></select>
$('#select').change(function() { //一: console.log($(this).val()); //二: var options=$("#select option:selected"); console.log(options.val()); })