OTE><% Rs.PageSize = 5 If Page < 1 Then Page = 1 If Page > rs.PageCount Then Page = rs.PageCount If Page <= 0 Then Msg = "搜索结果:没有找到任何符合条件的文件!" Msg = Server.HTMLEncode( Msg ) Response.Clear Response.Redirect Myself & "?Msg=" & Msg & Param End If rs.AbsolutePage = Page For iPage = 1 To rs.PageSize Recomo = (Page - 1) * rs.PageSize + iPage %> <B><%=Recomo & ". "%><%=rs("DocTitle")%></B><BR> <B>摘要:</B><%=rs("Characterization")%><BR> <B>网址:</B><A HREF=<%=rs("vPath")%>><%=rs("vPath")%></A><BR> <B>时间: </B><%=rs("Write")%><BR> <B>大小: </B><%=rs("Size")%><P> <% rs.MoveNext If rs.EOF Then Exit For Next %></TABLE></BLOCKQUOTE> <DIV ALIGN=right><FORM Action=<%=Myself%> Method=GET><HR> <%If Page <> 1 Then ' 如果不是位于第一页 %> <A HREF=<%=Myself%>?Page=1<%=Param%>>第一页</A> <A HREF=<%=Myself%>?Page=<%=(Page-1)%><%=Param%>>上一页</A> <%End If If Page <> rs.PageCount Then ' 如果不是位于最后一页%> <A HREF=<%=Myself%>?Page=<%=(Page+1)%><%=Param%>>下一页</A> <A HREF=<%=Myself%>?Page=<%=rs.PageCount%><%=Param%>>最后一页</A> <%End If%> 输入页号:<INPUT TYPE=TEXT Name=Page SIZE=3> 页号:<FONT COLOR="Red"><%=Page%>/<%=rs.PageCount%></FONT> </FORM></P></DIV> <%End If%> <%If Request("Msg") <> Empty Then %> <HR><FONT Color=Red><%=Request("Msg")%></FONT> <%End If%></BODY></HTML> 4 小结 通过运用index sever对象属性,就可以达到站内搜索功能的很好效果,增加了网站的功能,不 需要外部的搜索,提高了查找效率,方便了网站浏览,在网站的运行里面,该搜索系统表现良好,速 度也很快,界面也很类似我们经常使用的互联网上一些著名的搜索引擎。 参考文献 微软公司 http://www.microsoft.com 清华大 学出版社 廖信彦著,ASP应用大全-ASP与数据库整合,2000年. 上一页 [1] [2]
Tags:
|