根据一个月每一天的不同播放不同的背景音乐,你要事先设置好

来源:互联网   编辑:思良  发表时间:2015-07-13  关注度:1114  

脚本说明:
把如下代码加入<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>


原文:http://www.bm8.com.cn/jscode/show.asp?id=8

    支付宝扫码领红包,不用多说,用过的人都知道,双赢的,你得红包,我得到同等推广红包,比如你扫到1元,我也得1元,大家得到的红包可以去实体店消费!新用户至少10元以上哦,每天都有!希望大家每天来本站扫码!感谢感谢!

    把打赏改成扫码红包了!支持本站就扫码下!


下一篇:简简单单实现[随机切换风格]


上一篇:如何根据日期调用CSS


小提示:按 回车[Enter]键 返回,按 ←键 返回上一页, 按 →键 进入下一页。

网友评论(0条评论)

选择头像
     

新闻评论(共有 0 条评论)

手机访问

本站APP

联系我

加我微信