下拉框的问题!!在线等!
wmlf 2004-02-12 02:41:52 我现在有两个下拉诓。
一个为大类一个为下类。
我想大类变化时小类业变化。
我时想获取到大类的值后,
用select 语句查出小类的值,在加到小类的下拉诓中
】代码如下::
<% language="vbs"%>
<!--#include file="../Connections/conn_news.asp" -->
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<table width="273" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="96">
<select name="select1" style="WIDTH: 96px" >
<option value="gggggg">1</option>
<option value="opk,op,pl">2</option>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from id"
rs.open sql,conn,1
do while not rs.eof
response.write("<option value="&chr(34)&trim(rs("id"))&chr(34)&">"&trim(rs("name"))&"</option>")
rs.movenext
loop
%>
</select>
</td>
<td width="81"> <select name="select2" style="WIDTH: 96px" >
<option>2</option>
<%
set myrs=server.createobject("adodb.recordset")
sql1="select * from zid "
if sel_value<>"" then
sql1=sql1&"where id=sel_value "
end if
myrs.open sql1,conn,1
do while not myrs.eof
response.write("<option value="&chr(34)&trim(myrs("zid"))&chr(34)&">"&trim(myrs("zname"))&"</option>")
myrs.movenext
loop%>
</select></td>
<td><%dim sel_value
sel_value=request.QueryString ("select1")
response.Write sel_value %></td>
</tr>
</table>
错误在什么地方??