整理了一下,发出来给大家看看~
<head>
.....
<script language="javascript">
function url()
{
var class=document.getElementById("p1").value;
location.href="view_class?class="+class;
}
</script>
....
</head>
<body>
....
<table></tr><td>产品分类:</td>
<td><%
set rs=server.CreateObject("ADODB.recordset")
sql="select * from class"
rs.open sql,conn,3,3
%>
<select name="class" onchange="url();" id="p1">
<option selected
value="<%=rs("class")%>"><%=rs("class")%></option>
<%do while not rs.eof
response.Write "<option value="&rs("class")&">"&rs("class")&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
</td>
</tr>
</table>
....
</body>
[[italic] 本帖最后由 xmuer 于 2007-12-19 13:40 编辑 [/italic]]