标签:var val doc element get asc value bsp selected
<select id="tryselect" name="">
<option value="1">text 1</option>
<option value="2">text 2</option>
</select>
<script language="JavaScript">
<!--
var myid = document.getElementById("tryselect");
alert(myid.options[myid.selectedIndex].value +"\n" +myid.options[myid.selectedIndex].text)
//-->
</script>
标签:var val doc element get asc value bsp selected
原文地址:http://www.cnblogs.com/zqr99/p/7467328.html