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

📄 search.asp

📁 演示地址: http://www.71520.com/ 自动生成HTM 可以加上联播 数据库data/71520data.mdb 为了安全请自行修改 首页生成在admin/fso_in
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
keyword=trim(Request.form("keyword"))
stype=trim(Request.form("stype"))
if keyword="//admin" then
session("search")="//admin"
Response.Redirect "admin/index.asp"
Response.End 
end if
if keyword="" then
response.Write("查找字符不能为空,请重输入查找的信息返回重查")
Response.End 
end if
%>

<%
Set rs=Server.CreateObject("ADODB.Recordset")  
if   stype="name" then
	strsql="select * from song where name Like '%"& keyword &"%'"
end if
if   stype="singer" then
	strsql="select * from song where singer Like '%"& keyword &"%'"
end if
if   stype="lyrics" then
	strsql="select * from song where lyrics Like '%"& keyword &"%'"
end if

rs.open strsql,conn,1,1
result_num=rs.RecordCount
%>

<html><head><title>搜索:
<%=Request.form("keyword")%>
</title>
<STYLE type=text/css>
TD {
	FONT-SIZE: 9pt; LINE-HEIGHT: 17px
}
BODY {
	FONT-SIZE: 9pt;
	LINE-HEIGHT: 17px;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
P {
	MARGIN-BOTTOM: 1px; MARGIN-TOP: 1px
}
A:visited {
	TEXT-DECORATION: none;
	color: #000000;
}
A:active {
	COLOR: #ff0000; TEXT-DECORATION: none
}
A:link{TEXT-DECORATION:none ;Color:#006600}A:active,A:visited{TEXT-DECORATION:none ;Color:#006600}A:hover{TEXT-DECORATION: underline;Color:red}
</STYLE>
</head>
<body background="images/bg.gif">
<TABLE width="740" height="30" bgColor=#ffffff border=1 borderColor=#999999 cellPadding=0 cellSpacing=0 style="BORDER-COLLAPSE: collapse"  align=center>
      <TR align=center bgcolor="#2985d3">
        <TD ><font color="#006600">tv137音乐网 Www.tv137.Com 您的最佳选择~!广告少速度快~!流行TOP最强音乐送给您。喜欢本站就请发给您QQ上的好友吧~!Ctrl+F 查找 </font></TD>
      </tr>
</table>
<table width="740" bgColor=#ffffff border=1 borderColor=#999999 cellPadding=0 cellSpacing=0 style="BORDER-COLLAPSE: collapse"  align=center>
<tr><td><script src=../top_ad.js></script></td></tr></table>
                      <table width="740" cellpadding="0" cellspacing="3" align=center border=1>
<form name="search" method="post" action="search.asp">
                       <tr> 
                          <td align="center" bgcolor="#CCCCCC"><span class="style4">搜索:
                          <input class="text1" onfocus="this.value=''" value="输入您要查找的歌曲名称或歌手名称或歌词." name="keyword" size="80" type="text"> 
                            <select name="stype" style="FONT-SIZE: 9pt">
                                <option value="name" selected>-歌名-</option>
                                <option value="singer">-歌手-</option>
							    <option value="lyrics">-歌词-</option>
                            </select> 
                          <input type="submit" name="imageField" value="提交">                          </td>
                       </tr>
					   </form>
					   </table>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=0 width=740 
align=center bgColor=#CCCCCC borderColorLight=#3972b4 border=1>
<tr>
<td>
搜索关键字:<font color="#006600"><%=Request.form("keyword")%></font> 搜索结果如下  共搜索到<%=result_num%>个记录
</td>
</tr>
</table>
<TABLE cellSpacing=0 borderColorDark=#C9F2BD cellPadding=0 width=740 align=center bgColor=#C9F2BD borderColorLight="#C9F2BD" border="1">
  <tr> 
    <td width="180" height="20 align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;歌曲名称</td>
    <td width="135" height="20" align="center">歌手</td>
    <td width="131" height="20" align="center">歌词</td>
    <td width="59" height="20" align="center">铃声</td>
  </tr>
  <%
   while not rs.eof
   %> 
  <tr>
    <td width="180" height="20" align="center"><a href="html/<%=rs("id")%>.htm" target="_blank" ><font color=#0000FF><%=rs("name")%></font></a></td>
    <td width="135" height="20" align="center" ><a href=http://post.baidu.com/f?ct=&tn=&rn=&pn=&lm=&kw=<%=rs("singer")%>&rs2=0&myselectvalue=1&word=<%=rs("singer")%>&tb=on target="_blank"><%=rs("singer")%></a></td>
    <td width="131" height="20" align="center"><a href="html/<%=rs("id")%>.htm" target="_blank" ><font color=#0000FF>点击查看</font></a></td>
    <td width="59" height="20" align="center"><a href="http://www.hexun.com/mms/ring/?smsid=12847&h=2" target="_blank"><img src="images/Send.gif" alt="手机铃声" width="18" height="14" border="0"></a></td>
  </tr>
  <%
      rs.movenext
	wend
	%>
</table>


</tr>
</table>

<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=0 width=740 
align=center bgColor=#e7eff7 borderColorLight=#3972b4 border=1>
<tr><td><script src=js/s_ad.js></script></td></tr>
  <tr> 
    <td height="20" colspan="6" align="center" bgcolor="#CCFFFF"> 
      <p align="center"><span class="style5">&copy;2005</span> Www.<span class="style6">d</span><span class="style7">113</span>.Com</p><br>
<script src="http://www3.itsun.com/counter.php?uuid=1509504&style=text"></script></td>  
  </tr>
</table>
 <%
 rs.close
    set rs=nothing
    conn.close
    set conn=nothing
	%>
</body>
</html>

⌨️ 快捷键说明

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