js的select取value取text
<html>
<head>
<title>取值演示</title>
<script language="javascript">
function test_change()
{
var txt=document.test.options[document.test.selectedIndex].text;//取文本
var val=document.test.options[document.test.selectedIndex].value;//取值
alert("选择的文本"+txt+"选择的值"+val);
}
</script>
</head>
<body>
<select name="test" onchange="test_change();" >
<%
Dim i
For i=0 To 100
Response.Write "<option value='"&i&"' >测试"&i&"</option>"
Next
%>
</body>
</html>