⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.asp

📁 支持在线订单提交
💻 ASP
字号:
<%
dim keyword
keyword=request.form("keyword")
If keyword="" Then
response.write "<script>alert('请输入关键字!');history.back();</Script>"
response.end
End If
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<title></title>
<script language="javascript">
<!--
if (parent.frames.length > 0) {
parent.location.href = location.href;
}
// --></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Description" content="域名注册、主机租用、网站建设、应用服务.Domain register,Virtual host,Website design,ASP,25175,www.25175.com">
<meta name="Keywords" content="域名注册,主机租用,网站建设,应用服务,Domain,register,Virtualhost,Website,design,ASP,service">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css">
<!---a:link      { color: #306898; font-family: Arial; text-decoration: underline }
a:visited    { color: #306898; font-family: Arial; text-decoration: underline }
a:active     { color: red; font-family: Arial; text-decoration: none }
a:hover      { color: 306898; text-decoration: none }
body         { color: #6e6e6e; font-size: 9pt; line-height: 12pt; font-family: Arial }
th           { font-size: 9pt; line-height: 12pt }
td           { font-size: 9pt; line-height: 12pt }
a.1:link     { font-family: Arial; text-decoration: none; color: silver }
a.1:visited  { font-family: Arial; text-decoration: none; color: silver }
a.1:hover    { font-family: Arial; text-decoration: none; color: white }
a.2:link     { font-family: Arial; text-decoration: none; color: #6e6e6e }
a.2:visited  { font-family: Arial; text-decoration: none; color: #6e6e6e }
a.2:hover    { font-family: Arial; text-decoration: none; color: silver }
a.3:link     { font-family: Arial; text-decoration: none; color: white }
a.3:visited  { font-family: Arial; text-decoration: none; color: white }
a.3:hover    { font-family: Arial; text-decoration: none; color: #d0ccd0 }
a.s:link     { font-family: Arial; text-decoration: underline; color: #606C88 }
a.s:visited  { font-family: Arial; text-decoration: underline; color: #606C88 }
a.s:hover    { font-family: Arial; text-decoration: none; color: #606C88 }
.line        { line-height: 10pt }
.il          { line-height: 12pt }
.form        { font-size: 9pt; font-family: Arial }
.btn         { font-size: 9pt; height: 19; border-style: ridge; border-width: 1 }
.text        { font-family: Arial; font-size: 9pt; border: 1 solid #707070 }
body         { scrollbar-face-color: #D8D4C8; scrollbar-highlight-color: #D8D4C8; 
               scrollbar-shadow-color: #D8D4C8; scrollbar-3dlight-color: 
               #ffffff; scrollbar-arrow-color: blcak; scrollbar-track-color: 
               #E9EDEF; scrollbar-darkshadow-color: #888484 }
---></style>
</head>

<%
dim conn,connstr,rs,sql
on error resume next
connstr="DBQ="+server.mappath("client_db/s.mdb")+";DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("adodb.connection")
conn.open connstr
sql="select keyword,ID,title,url from s where keyword like '%"&keyword&"%' order by ID desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<body marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" leftmargin="0" bgcolor="#B0B0B0" text="#808080">


<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="750" height="379" bgcolor="#FFFFFF" background="">
<tr>
<td height="379" width="251" rowspan="4" valign="top">
<div align="center">
  <table border="0" cellspacing="1" width="100%" height="290">
    <tr>
      <td width="100%" height="34"><form method="POST" action="search.asp">
          <input type="text" name="keyword" size="20" class="text">
          <input type="submit" value="搜索" name="B1" class="btn" style="width: 40; height: 20">
      </form></td>
      <center>
      </center>
    </tr>
    <tr>
      <td width="100%" height="247" valign="top"></td>
    </tr>
  </table>
</div>
</td>
<td height="20" width="468">
<%If rs.eof and rs.bof Then
response.write"<p align=center>对不起,没有搜索到合适的结果。</p><br><br><br><br><br><br><br><br><br><br><br><br><br>"
rs.close
conn.close
set rs=nothing
set conn=nothing
Else%>
你查询的关键字是:<font color="red"><%=request.form("keyword")%></font>&nbsp;&nbsp;&nbsp;共搜索到了<font color="red"><%=rs.recordcount%></font>个结果,共<font color="red">1</font>页。</td>
<td height="379" width="30" rowspan="4">&nbsp;</td>
</tr>
<tr>
<td height="323" width="468" valign="top">
<table border="0" cellspacing="1" width="90%">
<tr>
<td width="100%">
<ul>
<% do while not rs.eof%>
<li><a href="<%=rs("url")%>" class="s" target="_blank"><%=rs("title")%></a><br>
URL:<a href="<%=rs("url")%>" class="2" target="_blank"><%=rs("url")%></a></li>
<%
rs.movenext
loop
%>
</ul></td>
</tr>
</table></td>
</tr>
<tr>
<td height="16" width="468" valign="top">&nbsp;</td>
</tr>
<tr>
<td height="20" width="468" valign="top">&nbsp;</td>
</tr>
<%End If
conn.close
set conn=nothing
rs.close
set rs=nothing
%>
</table>
</div>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -