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

📄 search.asp

📁 文章管理系统,生成静态网页 .
💻 ASP
字号:
<!--#include file=setup.asp-->
<!--#include file=head.asp-->
<!--#include file=conn.asp-->
<!--#include file=include.asp-->
<%
if request("submit")<>"" then
content=server.htmlencode(trim(request("content")))
if content="" then err("错误!必填项目不能为空!")

set conn=server.createobject("adodb.connection")
conn.open connstr
if conn.execute("select * from wz where  title like '%"&content&"%' ").eof then err("没有搜索到你要的内容")

set rs=server.createobject("adodb.recordset")
rs.open "select * from wz where title like '%"&content&"%' ",conn,1,1
c=rs.recordcount
%>
<table width=90% align=center cellpadding=3 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF>
<br>
&nbsp共有<%=c%>条符合<font color=red><%=content%></font>的资料
<br>
<table width=90% bgcolor=white align=center><tr><td bgcolor=#FFFFFF>
<%
for i=1 to c
if rs.eof then exit for
response.write "<a href="&path&"/58down/"&rs("date")&"-"&rs("num")&".htm target=_blank>"&rs("title")&"</a><font color=silver>("&rs("date")&")</font><br>" 
rs.movenext
next 
%>
</table>
<br>
<a href=javascript:history.back(-1)>返回重新搜索</a>
<br>
</table>

<%
response.end
end if

%>
<table width=90% align=center cellapdding=3 cellspacing=1 ><tr><td bgcolor=#FFFFFF colspan=2 align=center height=150 valign=middle>
<br><br>
<form method=post action=<%=self%>>
<table width=60% align=center cellapdding=3 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF colspan=2 align=center>打出你要搜索的内容
<tr><td bgcolor=#FFFFFF width=30%>搜索内容<td bgcolor=#FFFFFF><input class="inputf" name=content value=驰志网络 size=40>
<tr><td bgcolor=#FFFFFF colspan=2 align=center><input class="input1" type=submit name=submit value="搜索">&nbsp&nbsp<input class="input1" type=reset value="取消">
</table>
<br>
搜索代码<br>
<textarea cols=50 rows=5 class="input4" onclick="this.select(-1)"><form action=<%=path%>/search.asp>
<input name=content size=10>
<input type=submit name=submit value="搜索"></textarea>
<br><br><br>
</table>

⌨️ 快捷键说明

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