一个动态添加的下拉框,就是数据是从数据库循环取出来的。类似:
北京
天津
上海
大连
广州
如果我要选择大连作为默认项,怎么写呢?现在全部取出的代码为:<select name="fflang" style="width:152 ">
<%rs1.movefirst%>
<%while not rs1.eof%>
<%if rs1("para_typ")="14" then%>
<option value=<%= rs1("para_cd")%>><%= rs1("para_drpt")%></option>
<%end if%>
<%rs1.movenext%>
<%wend%></select>
北京
天津
上海
大连
广州
如果我要选择大连作为默认项,怎么写呢?现在全部取出的代码为:<select name="fflang" style="width:152 ">
<%rs1.movefirst%>
<%while not rs1.eof%>
<%if rs1("para_typ")="14" then%>
<option value=<%= rs1("para_cd")%>><%= rs1("para_drpt")%></option>
<%end if%>
<%rs1.movenext%>
<%wend%></select>
就是
用一个变量a当取出来的字符=大连的时候,a=“select”否则a=""大家帮帮忙
a="selected"
<%else%>
a=""
<%end if%>肯定有问题