vb中下拉框连动,如何将第一个下拉框的值赋值给二级下拉框的select语句作为条件呢
<TDwidth="121"height=32style="PADDING-LEFT:10px">公司行业:</TD><TDstyle="PADDING-LEFT:10p...
<TD width="121" height=32 style="PADDING-LEFT: 10px">公司行业:</TD>
<TD style="PADDING-LEFT: 10px;block">
<select name="hy1"onClick="Javascript:SelectLoc(document.form1.hy1.value)">
<option value="0">请选择公司行业</option>
<%
sql1 = "select distinct code,hylba from hylbb"
i1=5
Set RS1 = Server.CreateObject("ADODB.Recordset")
Rs1.Open Sql1,Conn,1,2
Do While Not Rs1.Eof
strTemp1 = strTemp1 & "<option value="&Rs1("hylba")&">" & Rs1("hylba")&"</option>"
Rs1.MoveNext
Loop
Response.Write(strTemp1)
Rs1.Close
Set Rs1 = Nothing
%>
</select><select name="hy2" id="hy2">
<option value="hy2" selected>请选择公司行业</option>
<%
Dim RS2,i2 ,Sql2,strTemp2 ,temp
temp=?????????????
sql2 = "select distinct code,hylbb from hylbb where hylba like '"&temp&"'"
i2=5
Set RS2 = Server.CreateObject("ADODB.Recordset")
Rs2.Open Sql2,Conn,1,2
Do While Not Rs2.Eof
strTemp2 = strTemp2 & "<option value="&Rs2("hylbb")&">" & Rs2("hylbb")&"</option>"
Rs2.MoveNext
Loop
Response.Write(strTemp2)
Rs2.Close
Set Rs2 = Nothing
%>
</select>
</td> 展开
<TD style="PADDING-LEFT: 10px;block">
<select name="hy1"onClick="Javascript:SelectLoc(document.form1.hy1.value)">
<option value="0">请选择公司行业</option>
<%
sql1 = "select distinct code,hylba from hylbb"
i1=5
Set RS1 = Server.CreateObject("ADODB.Recordset")
Rs1.Open Sql1,Conn,1,2
Do While Not Rs1.Eof
strTemp1 = strTemp1 & "<option value="&Rs1("hylba")&">" & Rs1("hylba")&"</option>"
Rs1.MoveNext
Loop
Response.Write(strTemp1)
Rs1.Close
Set Rs1 = Nothing
%>
</select><select name="hy2" id="hy2">
<option value="hy2" selected>请选择公司行业</option>
<%
Dim RS2,i2 ,Sql2,strTemp2 ,temp
temp=?????????????
sql2 = "select distinct code,hylbb from hylbb where hylba like '"&temp&"'"
i2=5
Set RS2 = Server.CreateObject("ADODB.Recordset")
Rs2.Open Sql2,Conn,1,2
Do While Not Rs2.Eof
strTemp2 = strTemp2 & "<option value="&Rs2("hylbb")&">" & Rs2("hylbb")&"</option>"
Rs2.MoveNext
Loop
Response.Write(strTemp2)
Rs2.Close
Set Rs2 = Nothing
%>
</select>
</td> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询