懂点ASP的都来看看,可能是小问题!
我自己用ASP弄的一个搜索功能为什么在主页上好使~
在别的页面上我把主页上搜索代码拷贝过来。然后搜索第一次什么也搜索不到~
再点搜索就能搜索到~这是为什么啊~谁能告诉我啊?
这是那个代码~ 第一次什么都搜索不着,再点一次就能搜索到结果~不知道为什么
<select name="txtDiduan" size="1" class=f11>
<option selected value="%">--不限--</option>
<%dim rs2,sql2,sel
set rs2=server.createobject("adodb.recordset")
sql2="select * from fctype"
rs2.open sql2,conn,1,1
do while not rs2.eof
if typeID=cstr(rs2("typeID")) then
sel="selected"
else
sel=""
response.write "<option " & sel & " value='" + Cstr(rs2("type")) + "'>" + rs2("type") + "</option>"
rs2.movenext
end if
loop
rs2.close
%>
</select>
</span><span class=9size> <span style="font-size: 9pt"> </span> </span></td>
</tr>
<tr>
<td height="26" valign="bottom"><span class=9size> <span style="font-size: 9pt"> </span><span style="font-size: 9pt" id="fps0">&nbsp;&nbsp; 面积: </span><span style="font-size: 9pt" id="fps4"> </span><span style="font-size: 9pt" id="fps0">
<select name=txtMianj class=form>
<option value=% selected>---不 限---</option>
<option value=A>50平方以下</option>
<option value=B>50-70平方</option>
<option value=C>70-90平方</option>
<option value=D>90-110平方</option>
<option value=E>110-150平方</option>
<option value=F>150平方以上</option>
</select>
</span><span style="font-size: 9pt"> </span><span style="font-size: 9pt"> </span> </span></td>
</tr>
<tr>
<td height="26" valign="bottom"><span class=9size> <span style="font-size: 9pt"> </span><span style="font-size: 9pt" id="fps0">&nbsp;&nbsp; 总价: </span><span style="font-size: 9pt" id="fps5"> </span><span style="font-size: 9pt" id="fps1">
<select name=txtJiag class=form>
<option value=% selected>---不 限---</option>
<option value=A>8万以下</option>
<option value=B>8-10万</option>
<option value=C>10-12万</option>
<option value=D>12-15万</option>
<option value=E>15-20万</option>
<option value=F>20-25万</option>
<option value=G>25-30万</option>
<option value=H>30-40万</option>
<option value=I>40-50万</option>
<option value=J>50-100万</option>
<option value=K>100-200万</option>
<option value=L>200万以上</option>
</select>
</span><span style="font-size: 9pt"> </span><span style="font-size: 9pt"> </span> </span></td>
</tr>
<tr>
<td height="26" valign="bottom"> <span class=9size><span style="font-size: 9pt"> </span><span style="font-size: 9pt" id="fps0">&nbsp;&nbsp; 时间: </span><span style="font-size: 9pt" id="fps6"> </span><span style="font-size: 9pt" id="fps2">
<select name=txtsj class=form>
<option value=3600 selected>---不 限---</option>
<option value=7>七天内信息</option>
<option value=15>半月内信息</option>
<option value=30>一月内信息</option>
<option value=90>三月内信息</option>
</select>
</span><span style="font-size: 9pt"> </span><span style="font-size: 9pt"> </span> </span> </td>
</tr>