随日期播放音乐
跟据日期能听到不同的音乐!
今天是:5月18日.播放5月18日的音乐
脚本说明: 把如下代码加入<head>区域中 <table border=5 bordercolor=blue borderlight=green> <tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>跟据日期能听到不同的音乐!</strong></font></td></tr><tr><td align=center><SCRIPT language="JavaScript"> <!-- page=new Date(); if (page.getDate() == 1) document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 2) document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 3) document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 4) document.write("<bgsound src=song4.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 5) document.write("<bgsound src=song5.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 6) document.write("<bgsound src=song6.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 7) document.write("<bgsound src=song7.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 8) document.write("<bgsound src=song8.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 9) document.write("<bgsound src=song9.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 10) document.write("<bgsound src=song10.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 11) document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 12) document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 13) document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 14) document.write("<bgsound src=song4.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 15) document.write("<bgsound src=song5.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 16) document.write("<bgsound src=song6.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 17) document.write("<bgsound src=song7.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 18) document.write("<bgsound src=song8.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 19) document.write("<bgsound src=song9.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 20) document.write("<bgsound src=song10.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 21) document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 22) document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 23) document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 24) document.write("<bgsound src=song4.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 25) document.write("<bgsound src=song5.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 26) document.write("<bgsound src=song6.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 27) document.write("<bgsound src=song7.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 28) document.write("<bgsound src=song8.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 29) document.write("<bgsound src=song9.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 30) document.write("<bgsound src=song10.mid width=145 height=30 autostart=true loop=-1 volume=50>"); if (page.getDate() == 31) document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>"); page=new Date(); var months = new Array(13); months[1] = "1月"; months[2] = "2月"; months[3] = "3月"; months[4] = "4月"; months[5] = "5月"; months[6] = "6月"; months[7] = "7月"; months[8] = "8月"; months[9] = "9月"; months[10] = "10月"; months[11] = "11月"; months[12] = "12月"; var dateObj = new Date() var lmonth = months[dateObj.getMonth() + 1] var date = dateObj.getDate() document.write("<br>" +"今天是:"+ lmonth + date+"日"+"播放007主题曲") //--> </SCRIPT></td></tr> </table>