我的网站www.ershou027.com 检索功能是改的别人的,发现检索的时候只能显示第一页,点下一页就显示不正常了----显示的不是检索内容而是全部内容(效果请进网站在最上面有个检索框,随便输入个名词如“电脑”检索)。请各位牛人帮我支招,小生感激不尽。以下是部分关键代码(问题应该是出现在最下面的“上一页”“下一页”那连接上): <!--#include file="conn1.asp"--> <!--#include file="config.asp"--> <% dim rs,sql,i,tj,class1,class2,cnmai,diqu set rs=server.createobject("ADODB.recordset") key=request("keyword") if request("page")="" then ThisPage=1 else ThisPage=request("page") end if %> <HTML><HEAD><TITLE>武汉2手网-信息检索结果</TITLE></HEAD><BODY bgColor=#cccccc topMargin=0><!--#include file="top.asp" --> <div align="center"> <table width="760" border="0" bgcolor="#FFFFFF"> <tr> <td width="580" valign="top"> <table width="100%" id="table1" border="0" cellpadding="0" cellspacing="1" bgcolor="#111111"> <tr style="FONT-WEIGHT: bold; BORDER-LEFT-COLOR: #2E99CC; BORDER-BOTTOM-COLOR: #2E99CC; BORDER-TOP-COLOR: #2E99CC; BACKGROUND-COLOR: #2E99CC; BORDER-RIGHT-COLOR: #2E99CC" align="middle"> <td style="width: 100%; background-color:#efefef" align="left" bordercolor="#fbfbfb" colspan="5" height="1">搜索关键字:<font color="##FF0000"><%=key%></font> </td> </tr> <tr style="FONT-WEIGHT: bold; BORDER-LEFT-COLOR: #2E99CC; BORDER-BOTTOM-COLOR: #2E99CC; BORDER-TOP-COLOR: #2E99CC; BACKGROUND-COLOR: #2E99CC; BORDER-RIGHT-COLOR: #2E99CC" align="middle"> <td width="58" height="26" bgcolor="f1f1f1"><font color="#555555">方式</font></td> <td width="340" height="26" bgcolor="f1f1f1"><font color="#555555">信息标题</font></td> <td width="40" height="26" bgcolor="f1f1f1"> <p><font color="#555555">价格</font></td> <td width="50" height="26" bgcolor="f1f1f1"><font color="#555555">点/回</font></td> <td width="86" height="26" bgcolor="f1f1f1"><font color="#555555">发布日期</font></td> </tr> <% dim ThisPage,Pagesize,Allrecord,Allpage,leixing tj=0 sql = "select * from xinxi where biaoti like '%"&key&"%' order by id desc" rs.open sql,conn,1,1 rs.Pagesize=20 Pagesize=rs.Pagesize Allrecord=rs.Recordcount Allpage=rs.Pagecount if ThisPage<1 then ThisPage=1 end if On Error Resume Next rs.move (ThisPage-1)*Pagesize if rs.eof then response.write "还没有添加信息!" else do while not rs.eof response.write "<tr>" response.write "<td style=""BACKGROUND-COLOR: #F3F3F3"" align=""middle"" width=""60"" height=""22"">" Select Case rs("leixing") Case "1" response.write "<font color=""#800000"">"&leixing1&"</font>" Case "2" response.write "<font color=""#FF00FF"">"&leixing2&"</font>" Case "3" response.write "<font color=""#008000"">"&leixing3&"</font>" Case "4" response.write "<font color=""#FF6600"">"&leixing4&"</font>" Case "5" response.write "<font color=""#ff0000"">"&leixing5&"</font>" Case "6" response.write "<font color=""#000080"">"&leixing6&"</font>" Case "7" response.write "<font color=""#0000FF"">"&leixing7&"</font>" Case "8" response.write "<font color=""#008080"">"&leixing8&"</font>" Case Else response.write "<font color=""#000000"">"&leixing9&"</font>" End Select response.write "</td>" response.write "<td style=""BACKGROUND-COLOR: #F3F3F3"" align=""left"" width=""342"" height=""22"">" response.write "<a target=""_blank"" title="""&rs("name")&"-发布于"&datevalue(rs("fbsj"))&""" href=xinximemo.asp?cnmai="&rs("id")&">" response.write ""&rs("biaoti")&"" response.write "</a>" response.write "</td>" response.write "<td style=""BACKGROUND-COLOR: #F3F3F3"" align=""middle"" width=""40"" height=""22"">" if rs("jiage")=0 then response.write "面 议" else response.write rs("jiage") end if response.write "</td>" response.write "<td style=""BACKGROUND-COLOR: #F3F3F3"" align=""middle"" width=""50"" height=""22"">"&rs("llcs")&"/"&rs("hfcs")&"</td>" response.write "<td style=""BACKGROUND-COLOR: #F3F3F3"" align=""middle"" width=""80"" height=""22"">"&datevalue(rs("fbsj"))&"</td></tr>" tj=tj+1 rs.movenext if tj>=Pagesize then exit do loop end if rs.close set rs=nothing %> </table></div> <div align="center"><center> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#f1f1f1"> <tr><td height="25" width="181"><a href="addxinxi.asp"><font color="#FF0000">【发布信息】</font></a>共有<font color="#CC5200"><%=Allrecord%></font>条记录</td><td height="25" width="96"><p align="center">共<font color="#CC5200"><%=Allpage%></font>页</td><td height="25" width="118"><p align="center">现在是第<font color="#CC5200"><%=ThisPage%></font>页</td><td height="25" width="157"><p align="center"><% if ThisPage<2 then response.write "<font color=""#808080"">首页</font> " response.write "<font color=""#808080"">上一页</font> " else response.write "<a href=?page=1&class1="&class1&"&class2="&class2&"&cnmai="&cnmai&">首页</a> " response.write "<a href=?page="&ThisPage-1&"&class1="&class1&"&class2="&class2&"&cnmai="&cnmai&">上一页</a> " end if if Allpage-ThisPage<1 then response.write "<font color=""#808080"">下一页</font> " response.write "<font color=""#808080"">尾页</font> " else response.write "<a href=?page="&(ThisPage+1)&"&class1="&class1&"&class2="&class2&"&cnmai="&cnmai&">下一页</a> " response.write "<a href=?page="&Allpage&"&class1="&class1&"&class2="&class2&"&cnmai="&cnmai&">尾页</a> " end if %></td></tr></table></center></div></td></tr></table></table></div> <!--#include file="end.htm" --> </BODY> </HTML> 本帖子不是广告,请不要误会,我这是面向武汉的网站,向各位站长宣传也没什么用。