日期:2014-05-16  浏览次数:20878 次

谁能为一个刚接触ASP的新手完成站内搜索结果分页处理,感谢!
代码如下:

<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp" -->
<!--#include file="config.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=request("key")%> </title>
<meta name="description" content="<%=config("description")%>" />
<meta name="keywords" content="<%=config("keywords")%>" />
<link href="images/style.css" type="text/css" rel="stylesheet" />
</head>
<body bgcolor="<%=config("bg")%>">
<!--#include file="header.asp" -->
<div align="center"><img src="/images/logo.jpg" width="100" height="80" alt="<%=config("title")%>" title="<%=config("title")%>" /></div>
  <tr>
    <td height="20">
    <div style="border-bottom:#005AB5 15px solid;"></div></td>
  </tr>
<!--#include file="search_so.asp" -->
<%
t=Trim(Request.Form("t"))
key=Trim(Request.Form("key"))
if t="" or key="" then
 Response.Write("<script>alert('请输入关键词!');history.back();</script>")
 Response.End()
end if
if t=1 then
 sql="select * from [shop] where 1=0"
else
 sql="select * from [news] where 1=0"
end if
keyArr=split(key," ")
for i=0 to ubound(keyArr)
  sql=sql&" or title like '%"&keyArr(i)&"%'"
next
set rs=conn.execute(sql)
if t=1 then
%>
<table width="917" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
        <td colspan="2" valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#F0F0F0">
          <tr>
            <td bgcolor="#EBEBEB"><table width="98%" border="0" cellpadding="10" cellspacing="0">
                <tr>
        <td>&nbsp;<b>关于先泽电器开关“<font color="#FF0000"><%=key%></font>”的搜索结果:</b></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td valign="top" bgcolor="#FFFFFF">
<tr>
    <td><table width="155" border="0" cellpadding="0" cellspacing="0">
      <tr>
<%
dim&nb