?? result.asp
字號:
<!--#include file="inc/const.asp"-->
<!--#include file="inc/function.asp"-->
<link rel="stylesheet" type="text/css" href="style/main.css">
<%
'搜索mp3采集程序
dim strResult,resultArr
dim strUrl,strKey
strKey=request("k")
if strKey="" then
response.write "非法操作"
response.end
end if
strKey=server.urlencode(strKey)
'strUrl = "http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&word="&strKey&"&lm=-1"
strUrl="http://search.tom.com/m.php?w="&strKey&"&mimetype=all"
strResult=getBody(strUrl)
'strResult="<a href=""http:"">testfsd</a><a href=""http:fdsfds"">tesfdsfdtfsd</a>"
'strResult=body(strResult,"<div id=""searchleft"">","</div>")
strResult=body(strResult,"<a href=","</a>")
resultArr=split(strResult,"<>")
%>
<form id="frmSearch" name="frmSearch" method="post" action="result.asp?act=s" onSubmit="return chkForm();">
<table width="100%" height="131" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="72" align="center"><img src="images/search_3.gif" alt="iMusic" width="196" height="72" title="iMusic"/></td>
</tr>
<tr>
<td height="59" align="center" valign="middle"><table width="352" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img src="images/search_7.jpg" width="20" height="24" /></td>
<td width="255"><input name="k" type="text" class="text" id="k" value="<%=request("k")%>"/></td>
<td width="77"><input type="image" name="imageField" src="images/search_9.gif" /></td>
</tr>
</table></td>
</tr>
</table>
</form><div id="music" style="display:none"></div>
<table width="80%" height="32" border="0" cellpadding="2" cellspacing="2" align="center">
<%
for i=0 to ubound(resultArr)-1
url=body(resultArr(i),"http://",""">")
url=mid(url,1,len(url)-4)
title=mid(resultArr(i),instr(resultArr(i),""">")+2,len(resultArr(i))-4)
title=nohtml(title)
title=replace(title,"""","")
%> <tr>
<td width="6%" align="center"><%=i+1%></td>
<td width="69%"><%=replace(title,request("k"),"<font color='#FF0000'>"&request("k")&"</font>")%></td>
<td width="25%" align="right"><a href="javascript:;" onclick="setList('<%=title%>','','<%=url%>','false')">添加</a> | <a href="javascript:;" onclick="setList('<%=title%>','','<%=url%>','true')">試聽</a></td>
</tr>
<%
next
%>
</table><a href="http://www.aspx1.com/" target="_blank">download from aspx1.com(asp.net學習門戶)</a>
<script>
function setList(title,artist,url,toPlay){
var music = title + "<>" + artist + "<>" + url + "<>" + toPlay;
document.getElementById('music').innerHTML=music;
}
function chkForm(){
var k=document.getElementById('k').value;
if (k==""){
alert("請輸入您要搜索歌曲的關鍵字");
document.getElementById('k').focus();
return false;
}
}
document.getElementById('k').focus();
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -