香烟 发表于 2007-4-27 11:50:28

***综合类***根据日期不同播放不同的背景音乐

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
要完成此效果把如下代码加入到<body>区域中

<table border=0 bordercolor=#000000 borderlight=green align="center">
<tr>
    <td align=center><font size=5 color=red face="arial, helvetica, sans-serif"><strong><font face="楷体_gb2312" size="4">跟据日期能听到不同的音乐!</font></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月";

months = "2月";

months = "3月";

months = "4月";

months = "5月";

months = "6月";

months = "7月";

months = "8月";

months = "9月";

months = "10月";

months = "11月";

months = "12月";



var dateobj = new date()

var lmonth = months

var date = dateobj.getdate()



document.write("<br>" +"今天是:"+ lmonth + date+"日"+"播放"+ lmonth + date+"的音乐")



//-->





</script></td></tr>

</table>
<div align="center"></div>
      










-------------------------- --- ------ ---

拥 有三人行 论坛管 理系列软件,一个人就可以管理一个论坛 的更新维护。还能使您的论坛有千人在线的真实火暴效果,让您不在为论坛因没有人气 而留不住会员而烦恼,使您的论坛早日成为一流的论坛。详情请登陆网站:http://www.cn srx.cn 三人行论坛管理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:24721 6 44985227)
页: [1]
查看完整版本: ***综合类***根据日期不同播放不同的背景音乐