简单asp音乐连播问题
请教前辈,asp实现音乐连播的问题 没有实现
方案:
列表页:复选框 赋值<%=rs("playurl")%> 表单提交到播放页
播放页有播放器(media player) 其中filename value="<%
dim strChecks,aryChecks
strChecks = Request.Form("muid")
aryChecks = split(strChecks,",")
Response.Write ("<ASX Version = ""3.0"">")
for i=0 to uBound(aryChecks)
Response.Write ("<Entry>")
Response.Write ("<Ref href =""" & aryChecks(i) & """/>")
Response.Write ("</Entry>")
next
response.write "</ASX>"
%>"
以下为那两页的源文件(请高手不吝赐教):
列表页:
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function selectAll()
{
for(var i=0;i<document.form1.muid.length;i++)
{
document.form1.muid[i].checked=true;
}
}
function unSelect()
{
for(var i=0;i<document.form1.muid.length;i++)
{
if(document.form1.muid[i].checked)
{
document.form1.muid[i].checked=false;
}
else
{
document.form1.muid[i].checked=true;
}
}
}
</script>
</head>
<body>
<%set rsm=server.CreateObject("adodb.recordset")
str="select top 10 * from music order by id desc"
rsm.open str,conn,1,1
%>
<form id="form1" name="form1" method="post" action="c.asp">
<table width="600" border="1" bordercolor="#006699">
<%do while not rsm.eof%>
<tr>
<td><label>
<input type="checkbox" name="muid" id="checkbox" value="<%=trim(rsm("playurl"))%>" />
</label></td>
<td><%=rsm("title")%></td>
<td> </td>
</tr>
<%rsm.movenext
loop
rsm.close
set rsm=nothing
%>
</table>
<p>
<label>
<input type="submit" name="button" id="button" value="提交" />
</label>
<input type="button" value="全选" onClick="selectAll();">
<input type="button" value="反选" onClick="unSelect();"> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
</body>
</html>
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
播放页:
<object id="mplayer"classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" align="center" border="0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="<%
dim strChecks,aryChecks
strChecks = Request.Form("muid")
aryChecks = split(strChecks,",")
Response.Write ("<ASX Version = ""3.0"">")
for i=0 to uBound(aryChecks)
Response.Write ("<Entry>")
Response.Write ("<Ref href =""" & aryChecks(i) & """/>")
Response.Write ("</Entry>")
next
response.write "</ASX>"
%>">
<param name="ShowControls" value="1">
<param name="ShowPositionControls" value="1">
<param name="ShowAudioControls" value="1">
<param name="ShowTracker" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowCaptioning" value="0">
<param name="AutoStart" value="1">
<param name="PlayCount" value="0">
<param name="AnimationAtStart" value="0">
<param name="TransparentAtStart" value="0">
<param name="AllowScan" value="0">
<param name="EnableContextMenu" value="1">
<param name="ClickToPlay" value="0">
<param name="InvokeURLs" value="1">
<param name="DefaultFrame" value="datawindow">
</object>