<script language="javascript">
var TotalSongs="<%=Num%>";
function play(){
if(document.Form1.SongList.selectedIndex < 0) alert('请选择你要播放的曲目!');
else{
var song;
url = document.Form1.SongList.options[document.Form1.SongList.selectedIndex].value;
// song="geci.aspx?id=" + ArrID[document.Form1.SongList.selectedIndex];
//document.all.IFrame1.src=song;
document.Form1.mPlayer1.URL = url;
document.Form1.mPlayer1.controls.play();
showTLab();
return;
}
}
//播放上一首
function Last_OneOK(){
if((document.Form1.SongList.selectedIndex > 0) && (document.Form1.SongList.selectedIndex < TotalSongs)){
document.Form1.SongList.options[document.Form1.SongList.selectedIndex - 1].selected = true;
play();
}
}
//播放下一首
function Next_OneOK(){
if(document.Form1.SongList.selectedIndex >= 0){
if(document.Form1.SongList.selectedIndex < TotalSongs - 1){
document.Form1.SongList.options[document.Form1.SongList.selectedIndex + 1].selected = true;
play();
}else{
document.Form1.SongList.options[0].selected = true;
play();
}
}
}
function showTLab(){
if(document.Form1.mPlayer1.playState == 1) Next_OneOK();
setTimeout("showTLab()", 5000);
}
</scrit>