跪求高手帮帮我~

PM520 2004-01-05 01:50:26
这个是我修改的一个音乐搜刮程序,为什么, 大小  格式  协议  连通率 等不能对齐呢??我弄了好久弄不明白


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>音乐搜索</title>
<STYLE type=text/css>BODY{FONT-SIZE: 9pt }TR{FONT-SIZE: 9pt }TD{FONT-SIZE: 9pt }A:link{COLOR: #000000; TEXT-DECORATION: none }A:visited{COLOR: #000000; TEXT-DECORATION: none }A:active{COLOR: #000000; TEXT-DECORATION: none }A:hover{COLOR: #000000; TEXT-DECORATION: underline }</STYLE>
<script>
function killErrors()
{
return true
}
window.onerror = killErrors
</script>
<script>
function valid_search2(){
if( document.searchview.word.value=="")
{window.alert("对不起,关键字不能为空!");
document.searchview.word.focus();
return false;
} ;
}
</script>
</head>
<body>

<div align="center">
<center>
<table width="100%">
<form action="music.asp" method="get"><tr>
<td width="100%">
<center>
<input class="input" maxLength="150" size="28" name="key" value="<%=Request("Key")%>"> <input type="submit" value="音乐搜索"><br>
<input id="fmp3" type="checkbox" value="1" name="fmp3" <%if Request("fmp3")="1" then Response.Write("checked")%>> Mp3
<input id="frm" type="checkbox" value="1" name="frm" <%if Request("frm")="1" then Response.Write("checked")%>> Rm
<input id="fwma" type="checkbox" value="1" name="fwma" <%if Request("fwma")="1" then Response.Write("checked")%>> Wma
<input id="fasf" type="checkbox" value="1" name="fasf" <%if Request("fasf")="1" then Response.Write("checked")%>> Asf</td>
</tr></form>
</table>
</center>
</div>
<%
on error resume next

Const adTypeBinary = 1
Const adTypeText = 2
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
With BytesStream
.Type = adTypeText
.Open
.WriteText vin
.Position = 0
.Charset = "GB2312"
.Position = 2
StringReturn = .ReadText
.close
End With
Set BytesStream = Nothing
Bytes2bStr = StringReturn
End Function

if Request("page")="" then
page=1
else
page=Request("page")
end if

if Request("fmp3")="" then fmp3=0 else fmp3=1
if Request("frm")="" then frm=0 else frm=1
if Request("fwma")="" then fwma=0 else fwma=1
if Request("fasf")="" then fasf=0 else fasf=1
F="&fmp3="&fmp3&"&frm="&frm&"&fwma="&fwma&"&fasf="&fasf
Url = "http://search.sogua.com/search/search.asp?key='"&Request("key")&"'&page="&page&F

set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false)
oSend.send()
if err.number<>0 then
Response.write err.description
Response.End()
end if

SourceCode = bytes2BSTR(oSend.responseBody)

web_start=inStr(SourceCode,"共找到")
url_start=inStr(web_start,SourceCode,"<font color=#FF7100>")
url_end=inStr(url_start,SourceCode,"</font></b> <font")
numm=mid(SourceCode,url_start+20,url_end-url_start-20)

betw=instr(SourceCode,"<tr height=16 align=center>")-instr(SourceCode,"<td width="&Chr(34)&"753"&chr(34)&" align="&chr(34)&"center"&chr(34)&" colspan=9 height="&chr(34)&"19"&chr(34)&"")
first=instr(SourceCode,"<tr height=16 align=center>")
SourceCode1 = Mid(SourceCode,first,abs(betw))

tt1=split(SourceCode1,"<a href=")

num1=ubound(tt1)
if num1<>0 then
Response.write"<center><table height=39 cellSpacing=1 cellPadding=0 width=99% bgColor=#000000 border=0><tr><td width=305 bgColor=#ffffff height=25>  歌曲名字</td><td width=89 bgColor=#ffffff height=25>  歌手</td><td width=59 bgColor=#ffffff height=25>  大小</td><td width=59 bgColor=#ffffff height=25>  格式</td><td width=60 bgColor=#ffffff height=25>  协议</td><td width=60 bgColor=#ffffff height=25>  连通率</td><td width=60 bgColor=#ffffff height=25>  歌词</td><td width=60 bgColor=#ffffff height=25>  试听</td></tr>"
for i =1 to Cint(num1) step 2
hao1=split(tt1(i)," onClick")
Turl=Replace(hao1(0),chr(34),"")
Mm1=split(hao1(1),"target=_blank>")
if fexe=1 or frar=1 or fzip=1 then
Mm211=split(Mm1(1),"</a>")
else
Mm21=split(Mm1(1)," - ")
Mm22=split(Mm21(1),"</a>")
end if
Mm3=split(Mm1(1),"</td>")

Url="http://search.sogua.com/search/"&Turl
TDurl=Replace(Url,"http://search.sogua.com/search/view.asp?","http://search.sogua.com/search/view.asp?action=like_search&")
if fexe=1 or frar=1 or fzip=1 then
MusicName=Replace(Mm211(0),"<","‹")
MusicName=Replace(MusicName,">","›")
else
singer=Replace(Mm21(0),"<","‹")
singer=Replace(singer,">","›")
MusicName=Replace(Mm22(0),"<","‹")
MusicName=Replace(MusicName,">","›")
end if

Response.Write "<tr><td width=305 bgColor=#ffffff height=25>  <a title='"&MusicName&"' style='cursor:hand' onClick="&chr(34)&"javascript:window.open('disp.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=240, width=470, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&">"&MusicName&"</a></td>"
if singer<>"" then
Response.Write "<td width=89 bgColor=#ffffff height=25>  <a title='搜索 "&singer&" 的歌曲' style='cursor:hand' href='music.asp?key="&singer&"' target=_blank>"&singer&"</a></td>"
else
Response.Write "<td width=89 bgColor=#ffffff height=25>  未知</td>"
end if
Response.Write mid(Mm3(1),36,15)+"<td width=60 bgColor=#ffffff height=25>  </td>" &chr(10)
Response.Write(mid(Mm3(2),36,15))+"<td width=60 bgColor=#ffffff height=25>  </td>" &chr(10)
Response.Write(mid(Mm3(3),36,15))+"<td width=60 bgColor=#ffffff height=25>  </td>" &chr(10)
Response.Write(mid(Mm3(4),36,15))+"<td width=60 bgColor=#ffffff height=25>  </td>" &chr(10)
Response.Write("<td width=60 bgColor=#ffffff height=25>  <a href='http://www.baidu.com/m?tn=baidump3lyric&ct=150994944&rn=10&word="&MusicName&"&lm=-1' target='_blank'><img src=pic/book.gif border=0></a></td>"&chr(10))
Response.Write("<td width=60 bgColor=#ffffff height=25>  <a title='"&MusicName&"' style='cursor:hand' onClick="&chr(34)&"javascript:window.open('disp.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=240, width=470, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&"><img src=pic/real.gif border=0></a></td>"&chr(10))
Response.write"</tr>"&chr(10)
next

Response.Write("</Table>")
else
Response.Write("<table align=center width=778 bgcolor=#ffffff border=0 cellspacing=0 cellpadding=0><tr><td>")
Response.Write("<br /><br /><br /><center>")
Response.Write("没有你要找的歌请")
Response.Write("<br /><br /><br /></center>")
Response.write "</td></tr>"
end if
Pbetw=Abs(int(instr(SourceCode,"<td width="&Chr(34)&"753"&Chr(34)&" align="&Chr(34)&"center"&Chr(34)&" colspan=9 height="&Chr(34)&"19"&Chr(34)&"")-instr(SourceCode,"</font><a target=""_blank""")))
Pfirst=instr(SourceCode,"<td width="&Chr(34)&"753"&Chr(34)&" align="&Chr(34)&"center"&Chr(34)&" colspan=9 height="&Chr(34)&"19"&Chr(34)&"")
Num=Mid(SourceCode,Pfirst,Pbetw)
Response.Write("<br><br>")
Response.Write(Replace(Replace(Num,"'",""),"search.asp","music.asp"))
Response.write "共找到 <font color=red>"&numm&"</font> 个结果  最后检测日期:"&(Date()-1)&""
Response.write ""
%>
...全文
117 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jfly301 2004-01-05
  • 打赏
  • 举报
回复
是在dr里面表格问题吗?我也遇到过,你把重要代码考一下,表格从新做可能就有用,
就是奇怪的,
PM520 2004-01-05
  • 打赏
  • 举报
回复
你们看看这个,,长长的,拉一跳下来。。

1.8 M
mp3
http
90%
2.1 M
mp3
http
90%
1.9 M
mp3
http
100%
xxrl 2004-01-05
  • 打赏
  • 举报
回复
是不是版本的问题?
wshzhi 2004-01-05
  • 打赏
  • 举报
回复
我也看过了,的确是齐的也
paz 2004-01-05
  • 打赏
  • 举报
回复
你的代码我试过了,在我这没什么异议,大小  格式  协议  连通率 等都是对齐的。
seesea125 2004-01-05
  • 打赏
  • 举报
回复
看代码就晕

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧