如何实现单击歌名则播放对应歌曲? 不明白问题描述,,,首先,音乐播放控件是必须的,比如:windowsmediaplayer, 点击某一行的时候,从数据库中读出音乐文件的目录,将目录传给控件, 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function play() { var Player=document.getElementById("mPlayer1"); var listMusic=document.getElementById("<%=lboxMyMusic.ClientID %>"); var url = listMusic.options[listMusic.selectedIndex].value; if(listMusic.selectedIndex!=null) { Player.URL = url; Player.controls.play(); getNextMusic(); } return; } function getNextMusic() { if(document.getElementById("mPlayer1").playState ==1) { NextPlay(); } setTimeout("getNextMusic()",500); } function NextPlay() { var Player=document.getElementById("mPlayer1"); var listMusic=document.getElementById("<%=lboxMyMusic.ClientID %>"); if(listMusic.selectedIndex>=0) { if((listMusic.selectedIndex+1)<=listMusic.length-1) { listMusic.options[listMusic.selectedIndex+1].selected=true; play(); } else { listMusic.options[0].selected=true; play(); } } } <OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="350" width="100%" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <PARAM NAME="_cx" VALUE="25003"> <PARAM NAME="_cy" VALUE="9260"> <PARAM NAME="FlashVars" VALUE=""> <PARAM NAME="Movie" VALUE="Navigation/snow.swf"> <PARAM NAME="Src" VALUE="Navigation/snow.swf"> <PARAM NAME="WMode" VALUE="Transparent"> <PARAM NAME="Play" VALUE="-1"> <PARAM NAME="Loop" VALUE="-1"> <PARAM NAME="Quality" VALUE="High"> <PARAM NAME="SAlign" VALUE=""> <PARAM NAME="Menu" VALUE="-1"> <PARAM NAME="Base" VALUE=""> <PARAM NAME="AllowScriptAccess" VALUE=""> <PARAM NAME="Scale" VALUE="ShowAll"> <PARAM NAME="DeviceFont" VALUE="0"> <PARAM NAME="EmbedMovie" VALUE="0"> <PARAM NAME="BGColor" VALUE=""> <PARAM NAME="SWRemote" VALUE=""> <PARAM NAME="MovieData" VALUE=""> <PARAM NAME="SeamlessTabbing" VALUE="1"> <PARAM NAME="Profile" VALUE="0"> <PARAM NAME="ProfileAddress" VALUE=""> <PARAM NAME="ProfilePort" VALUE="0"> <embed src="Navigation/snow.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="350" wmode="transparent"> </embed> </OBJECT> <asp:ListBox ID="lboxMyMusic" runat="server" Width=100% ForeColor=blue Height=150px> </asp:ListBox> 用C#.net做,实现出来就像我们平时在音乐网站听歌差不多,点击则播放,该怎么做? 求两个个正则 Repeater 实现点击按钮添加删除行 关于WPF TreeView CheckBox 全选问题 急! .net中html表单和服务器控件的问题 求正则表达式 急,这个字符串如何处理,请指教 关于ListBox这样的想法能实现吗? 关于TreeView,急! 如何在ASP.NET中用代码实现ACTION的功能?并取回ACTION页面的执行结果? 为什么我的上传只能成功第一次,以后就不行了?? 伪静态后,iis里设置首页问题,紧急求助。。 送分了!!驗証numric(10,4)--js
{ var Player=document.getElementById("mPlayer1");
var listMusic=document.getElementById("<%=lboxMyMusic.ClientID %>");
var url = listMusic.options[listMusic.selectedIndex].value;
if(listMusic.selectedIndex!=null)
{
Player.URL = url;
Player.controls.play();
getNextMusic();
}
return;
}
function getNextMusic()
{
if(document.getElementById("mPlayer1").playState ==1)
{
NextPlay();
}
setTimeout("getNextMusic()",500);
}
function NextPlay()
{
var Player=document.getElementById("mPlayer1");
var listMusic=document.getElementById("<%=lboxMyMusic.ClientID %>");
if(listMusic.selectedIndex>=0)
{
if((listMusic.selectedIndex+1)<=listMusic.length-1)
{
listMusic.options[listMusic.selectedIndex+1].selected=true;
play();
}
else
{
listMusic.options[0].selected=true;
play();
}
}
} <OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
height="350" width="100%" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<PARAM NAME="_cx" VALUE="25003">
<PARAM NAME="_cy" VALUE="9260">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="Navigation/snow.swf">
<PARAM NAME="Src" VALUE="Navigation/snow.swf">
<PARAM NAME="WMode" VALUE="Transparent">
<PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="">
<PARAM NAME="Scale" VALUE="ShowAll">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<PARAM NAME="Profile" VALUE="0">
<PARAM NAME="ProfileAddress" VALUE="">
<PARAM NAME="ProfilePort" VALUE="0">
<embed src="Navigation/snow.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="100%" height="350" wmode="transparent">
</embed>
</OBJECT>
<asp:ListBox ID="lboxMyMusic" runat="server" Width=100% ForeColor=blue Height=150px>
</asp:ListBox>