问题描述:
我想在music页面上点“试听”就把musiame这个参数传到play进行播放音乐,点“试听”也能到play页面,但是播放器里显是的是“准备就绪”
music的连接代码
<td align=center valign="middle" bgcolor="#000000"><span class="style10 style4"><a href="play?music=<%=rs("music")%>">试听<a></span></td>
play( 这个页面的代判档码是从网上考的,就改了一点点)
<!--#include file="config.inc"-->
<% dim musiame
musiame=request.QueryString("musiame")
set rs=server.CreateObject("adodb.recordset")
sql="select * from music where musiame='"&musiame &"'"
rs.open sql,conn,1,1
%>
<>
<head>
<meta -equiv="Content-Type" content="text/charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<object id="MediaPlayer1" width=460 height=68 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="[url=activex.microsoft/activex/controls/mplayer/en/n *** p2inf.cab#Version=6]activex.microsoft/activex/controls/mplayer/en/肢塌n *** p2inf.cab#Version=6,4,5,715"
align="baseline" border=0 standby="Loading Microsoft Windows Media Player ponents..."
type="application/x-oleobject">
<param name=invokeURLs value="0">
<param name=FileName value="<% Response.Write rsqumu("musiame")%>">
<param name=ShowControls value="1">
<param name=ShowPositionControls value="0">
<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=DefaultFrame value="datawindow">
<embed src=music/<% Response.Write rs(musiame")%>" align=baseline border=0 width=460 height=68
type="application/x-mplayer2"
pluginspage="microsoft/isapi/redir.dll?prd=windows&*** p=mediaplayer&ar=media&*** a=plugin&"
name="MediaPlayer" showcontrols="1" showpositioncontrols="0"
showaudiocontrols="1" showtracker="1" showdisplay="0"
showstatu *** ar="1"
autosize="0"
showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"
animationatstart="0" transparentatstart="0" allowscan="1"
enablecontextmenu="1" clicktoplay="0"
defaultframe="datawindow" invokeurls="0">
</embed>
</object>
</body>
</>
数据库里music表里有musiame这个字段,存的是文件名(如:眼泪.wma)
解析:
播放的应该是完整的URL
就是...../眼泪.wma
而且建议文件名都最好用英文字姆。
当你提交表单的时候ID是以字符串进行提交的
111,222,333,444
在播放亏答歼页面你分割数组举腔并且根据不同的ID把音销冲乐以列表形式读取出来
然后播放音乐,当音乐播放完成后,就自动播放下一首
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)