今天是

爱酷家


当前位置:首页 > 资源收藏 > 特效代码

MIDI音乐播放板

收集整理   发布时间:2012-10-30 21:56:00   阅读

MIDI音乐播放板

代码:
<Script Language="JavaScript">
<!-- 
song = new Array()
var x = 0

song[1] = "Songname # 1"
song[2] = "Songname # 2"
song[3] = "Songname # 3"
song[4] = "Songname # 4"
song[5] = "Songname # 5"
song[6] = "Songname # 6"

function prev(){
if (x>1)
{ x--
document.midi.typein.value=song [x]
}
}

function next(){
var max= song.length-1
if (x<max)
{ x++
document.midi.typein.value=song [x]
}
}

function go(){
if (x != 0){
location.href='song'+x+'.mid' //注意更改地址
}
}

function start(){
x=1
document.midi.typein.value=song [x]
}

function end(){
x=song.length-1
document.midi.typein.value=song [x]
}

function cls(){
document.midi.typein.value="Select Midi Song"
}
// Done Hiding -->
</Script>
<BODY Bgcolor="#ffffff" onload="cls()">
<FORM Name="midi">
<p align="left">
<INPUT NAME="typein" TYPE="text" SIZE="25" ALIGN=top><BR>
<font size=3 face="Comic Sans Ms">
<INPUT TYPE=Button Value="|<<" Align=left onclick="start()">
<INPUT TYPE=Button Value="<<" Align=left onclick="prev()">
<INPUT TYPE=Button Value="PLAY" Align=left onclick="go()">
<INPUT TYPE=Button Value=">>" Align=left onclick="next()">
<INPUT TYPE=Button Value=">>|" Align=left onclick="end()"> </p>
</FORM></font>

 



注:⊙如转载本站原创作品,请务必包保留本文地址:

内容: