<%
set rs6=server.CreateObject("adodb.recordset")
sql6="select * from lx where lx='区域'"
rs6.open sql6,conn,1,3
do while not rs6.eof
%>
<option value="<%=rs6("name")%>" <%if rs6("name")=rs0("name") then Response.Write" selected" %>>::::<%=rs6("name")%>::::</option>
<%rs6.movenext
loop
rs6.close%>
我想,让如果rs6("name")与rs0("name")相同时,则默认选择这个。请问怎么写啊,我写成这样怎么不对啊?
參考答案:<option value="<%=rs6("name")%>"
<%if rs6("name")=rs0("name") then%>
<%Response.Write"selected" %>>::::<%=rs6("name")%>::::</option>