select的问题
<option value= " "> —请选择— </option>
<%
selected= " "
for i = 0 to ubound(otherdesc)
if rs( "thesource ") = otherdesc(i) then selected = "selected "
response.Write( " <option value= ' "&otherdesc(i)& " ' "&selected& "> "&otherdesc(i)& " </option> ")
selected= " "
next
set toconn=nothing
%>
</select>
我一直是用这个
但老觉得应该有更好的办法
不知道谁能说说呢
[解决办法]
应该没什么更好的方法了~
[解决办法]
if rs.eof then exit for
next
[解决办法]
<Select size= "1 " name= "thesource ">
<Option value= " " Selected> 全部
<%Set RS=Conn.Execute( "select thesource from thesourcetable ")
Do While NOT Rs.EOF%>
<Option value= " <%=Rs(0)%> "> <%=Rs(1)%>
<% Rs.movenext
Loop
Rs.close%>
</Select>
這樣也可以哦!
[解决办法]
一般情况下都是这样的