关于省所在市下拉选择问题,请教高手解决
运行后只能下拉找到省,省对应的市看不到,我哪里错了?<tr bgcolor="#FFFFFF">
<td align="right">所在城市:</td>
<td><select size="1" class="wenbenkuang" name="szSheng" onChange=chsel()>
<option value="xxx" selected>请选择省份……</option>
<%dim tmpShengid
tmpShengid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * from province order by shengorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
if rs("szSheng")=rs_s("ShengNo") then
tmpproid=rs_s("proid")
%>
<option value="<%=rs_s("ShengNo")%>" selected ><%=trim(rs_s("ShengName"))%></option>
<%
else
%>
<option value="<%=rs_s("ShengNo")%>" >
<%=trim(rs_s("ShengName"))%></option>
<%
end if
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
</select>
<select size="1" class="wenbenkuang" name="szShi">
<%
set rs_s=server.createobject("adodb.recordset")
sql="select * from city where proid="&tmpproid&" order by shiorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
%>
<option value="<%=rs_s("ShiNo")%>" <%if rs("szShi")=rs_s("ShiNo") then%>selected<%end if%>><%=trim(rs_s("ShiName"))%></option>
<%
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
</select>
</td>
</tr>