asp 赋值给动态下拉列表
<%txt1=5txt2=8%><selectname="Province_select"onChange=chsel()style="width:90%"><optio...
<%
txt1 = 5
txt2 = 8
%>
<select name="Province_select" onChange=chsel() style="width:90%">
<option value="xxx" selected>请选择</option>
<%
dim tmpid '定义一个临时变量用来记住省id
tmpid=0
set rs_Province=server.CreateObject("ADODB.recordset")
sql="select * from ZwNew_SelType order by TypeMegOrder"
rs_Province.open sql,conn,1,1
while not rs_Province.eof
tmpid=rs_Province("id")
%>
<option value="<%=rs_Province("TypeMegNO")%>" ><%=trim(rs_Province("TypeMeg"))%></option>
<%
'response.Write form1.province_select.value
rs_Province.movenext
wend
rs_Province.close
set rs_Province=nothing
%>
</select>
<select name="City_select" style="width:90%">
<option value="yyy" selected="selected">请选择</option>
</select>
怎么样才能把值赋给下面的两个下拉列表 展开
txt1 = 5
txt2 = 8
%>
<select name="Province_select" onChange=chsel() style="width:90%">
<option value="xxx" selected>请选择</option>
<%
dim tmpid '定义一个临时变量用来记住省id
tmpid=0
set rs_Province=server.CreateObject("ADODB.recordset")
sql="select * from ZwNew_SelType order by TypeMegOrder"
rs_Province.open sql,conn,1,1
while not rs_Province.eof
tmpid=rs_Province("id")
%>
<option value="<%=rs_Province("TypeMegNO")%>" ><%=trim(rs_Province("TypeMeg"))%></option>
<%
'response.Write form1.province_select.value
rs_Province.movenext
wend
rs_Province.close
set rs_Province=nothing
%>
</select>
<select name="City_select" style="width:90%">
<option value="yyy" selected="selected">请选择</option>
</select>
怎么样才能把值赋给下面的两个下拉列表 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询