html代码:
<select id = "city" onchange="change()">
<option value = "0">郑州</option>
<option value = "1">洛阳</option>
</select>
JS代码:
<script>
function change() {
var selectObj = document.getElementByIdx_x('city');
var selectvalue = selectObj.value;
var selecttext = selectObj.options[selectObj.selectedIndex].text;
或
var selecttext = selectObj.options[selectObj.selectedIndex].innerHTML;
}
</script>