音樂播放器語法 | 2008-06-15 | Page:1/1 |
<!--撥放機--開始--> <script language="javascript"> <!-- var sound="boom.au" function soundOff(){ if (document.layers) {document.midi.document.write(" "); document.midi.document.close()} if (document.all) midi.innerHTML=" " } function soundOn(){ if (document.layers) { document.midi.document.write("<embed src="+sound+" autostart='true' loop='true' hidden='true'>"); document.midi.document.close()} if (document.all) midi.innerHTML="<embed src='"+sound+"' autostart='true' loop='true' hidden='true'>" } function getNewSound(){ sound=document.level.request.options[document.level.request.selectedIndex].value; soundOff() soundOn() } //--> </script> <div id="midi" style="position:absolute; visibility:show; left:30px; top:-10px; z-index:5"> <embed src="開啟時的音樂網址" autostart="true" loop="true" hidden="true" width="128" height="128"></div> <div id="form1" style="position:absolute; visibility:show; left:30px; top:20px; z-index:5"></div> <center><form action name="level"> <table bgcolor="#FF00FF" cellpadding="10" border="1"> <tr> <td> <table bgcolor="#ffff00" border="1"> <tr> <td> <table WIDTH="225" CELLSPACING="1" CELLPADDING="3" BORDER="1"> <tr> <td> <p align="center"> <select name="request" size="1" onChange="getNewSound()" STYLE="BACKGROUND:#8000FF;COLOR:FFFFFF"> <option>★★請選擇你喜歡的音樂★★ <option value="音樂網址">歌曲名稱 <option value="音樂網址">歌曲名稱 <option value="音樂網址">歌曲名稱 <option value="音樂網址">歌曲名稱 </select></p> </td> </tr> <tr> <td><center><input type="button" value="播放" title="播放" onClick="soundOn()" STYLE="COLOR:FFFFFF;HEIGHT:22PX;BACKGROUND-COLOR:#000000;BORDER:1 SOLID ffffff"> <input type="button" value="停止" title="停止" onClick="soundOff()" STYLE="COLOR:FFFFFF;HEIGHT:22PX;BACKGROUND-COLOR:#000000;BORDER:1 SOLID ffffff"></center></td> </tr> </table> </td> </table> </td> </table> </form> <!--撥放機--結束-->
|