Board logo

標題: 音樂選播機 [打印本頁]

作者: 蛙    時間: 9-6-2012 09:11     標題: 音樂選播機

<SCRIPT Language="JavaScript">
 midi = new Array(5);
 midi[0] = "
http://www.bunbunhk.com/dl/j1.mid";
 midi[1] = "
http://www.bunbunhk.com/dl/j2.mid";
 midi[2] = "
http://www.bunbunhk.com/dl/j3.mid";
 midi[3] = "
http://www.bunbunhk.com/dl/j4.mid";
 midi[4] = "
http://www.bunbunhk.com/dl/j5.mid";


 index = Math.floor(Math.random() * midi.length);
 document.write("<embed src=" + midi[index] + " autostart=true hidden=true loop=true name=midis volume=100%>");
 </SCRIPT>
 
<b>Music :</b>
<a href="javascript:document.midis.play()" target=_self>Play /</a>
 <a href="javascript:document.midis.stop()" target=_self>Stop /</a>
 <a href="javascript:location.reload()" target=_self>change music</a>

 

 

 

 

http://www.bunbunhk.com/dl/j5.mid  <<<音樂網址,可更改

 

 

new Array(5);  <<<可隨意加減歌曲,祇要將此更改數目

 midi[4] = "http://www.bunbunhk.com/dl/j5.mid";  <<<再增加或減少,但數字要跟著更改

 

 

 

Music : Play / Stop / change music

 

 

 

 

如不能顯示語法效果可貼去本站語法測試板試看


作者: 蛙    時間: 25-5-2013 11:43     標題: 複製上列語法








歡迎光臨 笨笨網站超級論壇 (http://www.bunbunhk.com/BBS/Discuz/) Powered by Discuz! 6.0.0