先谢谢各位!
不知道是不是路径的问题,我原来用的虚拟路径,现在改成绝对路径后好象又可以了,不知道还会不会出现那个问题!
先请各位看看我的代码
超连接调用播放器的代码:
<a href="" onClick="window.open('Play.asp?id=<%=rs("id")%>','Lcmusic','scrollbars=no,resizable=no,width=383,height=286,menubar=no,top=168,left=168')">
<%=rs("musicname")%></a>
调用连续播放的代码:
<form name="form<%=n%>" action="playlist.asp" onsubmit="javascript:return lbsong()" target="lbsong">play.asp代码:
<!--#include file="conn.asp"-->
<%
if request("id")<>"" then
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from MusicList where id="&id
rs.open sql,conn,1,3
if rs.eof then
Response.End
else
rs("hits")=rs("hits")+1
rs.Update
id=rs("id")
Wma=rs("Wma")
hits=rs("hits")
Singer=rs("Singer")
MusicName=rs("MusicName")
end if
rs.Close
else
errmsg= "<li>请选择歌曲!</li>"
call error()
Response.End
end if
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>音乐播放器</title>
<style type="text/css">
<!--
td { font-size: 9pt; color: #000000}
a:link { font-size: 9pt; color:#000000; text-decoration: none}
a:active { font-size: 9pt; ; text-decoration: underline}
a:visited { font-size: 9pt; color: #000000; text-decoration: none}
a:hover { font-size: 9pt; color:#000000; text-decoration: underline; background-color: #00FFFF}
-->
</style>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
</head>
<BODY bgColor=#CCCCCC leftMargin=0 topMargin=0 oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
<table border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1" height="259">
<tr>
<td width="100%" height="206">
<TABLE border=0 cellPadding=0 cellSpacing=0 height=140 width=100%>
<TBODY>
<TR>
<TD height=39 width=28><IMG height=39 src="images/tmp013.gif"
width=28></TD>
<TD height=39 width=325><IMG height=39 src="images/tmp014.gif"
width=325></TD>
<TD height=39 width=28><IMG height=39 src="images/tmp015.gif"
width=28></TD>
</TR>
<TR>
<TD height=2 width=28><IMG height=2 src="images/tmp016.gif"
width=28></TD>
<TD><IMG height=2 src="images/tmp019.gif" width=325></TD>
<TD height=2 width=28><IMG height=2 src="images/tmp017.gif"
width=28></TD>
</TR>
<TR>
<TD background=images/tmp016.gif height=54> </TD>
<TD bgColor=#a54d00 vAlign=top> <TABLE border=0 cellPadding=2 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD align=middle height=54><table width="100%" border="0">
<tr>
<td><div align="center"><img src="images/ads.gif" width="307" height="125"></div></td>
</tr>
<tr>
<td align=center><object id="mPlayer1" width=307 height=62
classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type=application/x-oleobject standby="Loading Windows Media Player components...">
<param name="URL" value="<%=wma%>">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value="">
<param name="playCount" value="10">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value="">
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="-1">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="0">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value="">
<param name="SAMILang" value="">
<param name="SAMIFilename" value="">
<param name="captioningID" value="">
<param name="enableErrorDialogs" value="0">
<param name="_cx" value="12435">
<param name="_cy" value="1640">
</object></td>
</tr>
</table>
</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD background=images/tmp017.gif height=54> </TD>
</TR>
<TR>
<TD height=45><IMG height=45 src="images/tmp020b.gif" width=28></TD>
<TD height=45><IMG border=0 height=45 src="images/tmp022b.gif" width=325></TD>
<TD height=45><IMG height=45 src="images/tmp021.gif"
width=28></TD>
</TR>
</TBODY>
</TABLE>
</td>
</tr>
</table>
</td>
</tr>
</table>
</BODY></HTML>
playlist.asp代码:
<!--#include file="conn.asp"-->
<%
if request("checked")="" then
response.write"<SCRIPT language=JavaScript>alert('哈哈! 出错啦! 至少要选择歌曲一首以上才能连播!');"
response.write"javascript:window.close();</SCRIPT>"
else
end if
conn.close
set rs=nothing
set conn=nothing
Wma=replace(request("checked"),"","")
Wma=Wma
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>音乐播放器</title>
<style type="text/css">
<!--
td { font-size: 9pt; color: #000000}
a:link { font-size: 9pt; color:#000000; text-decoration: none}
a:active { font-size: 9pt; ; text-decoration: underline}
a:visited { font-size: 9pt; color: #000000; text-decoration: none}
a:hover { font-size: 9pt; color:#000000; text-decoration: underline; background-color: #00FFFF}
-->
</style>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
</head>
<BODY bgcolor="#FFFFCC">
<TABLE border=0 cellPadding=0 cellSpacing=0 height=298 width=48% align="center">
<tr align=center valign=bottom>
<td><img src=images/yf.gif width=350 height=210></td>
</tr>
<TR align="center" valign=top>
<td >
<object id="mPlayer1" width=350 height=62
classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type=application/x-oleobject standby="Loading Windows Media Player components...">
<param name="URL" value="list.asp?id=<%=wma%>">
<param name="Album" value="浪潮音乐网"/>
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value="">
<param name="playCount" value="10">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value="">
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="0">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value="">
<param name="SAMILang" value="">
<param name="SAMIFilename" value="">
<param name="captioningID" value="">
</object></td>
</TR>
</TABLE>
</BODY>
</HTML>