⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 music2.htm

📁 javascript各种效果的实例及源代码
💻 HTM
字号:
<html>
<head>
<title>随日期播放音乐</title>
<style type="text/css">
<!--
body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#fef4d9">
<br>
<br>
<center><font color=red face="隶书" size=6>随日期播放音乐</font></center>
<br>
<center>
<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=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 8) 
document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 9) 
document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 10) 
document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 11) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 12) 
document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 13) 
document.write("<bgsound src=song1.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 14) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 15) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 16) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 17) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 18) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 19) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 20) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 21) 
document.write("<bgsound src=song2.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 22) 
document.write("<bgsound src=song3.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=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 25) 
document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 26) 
document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 27) 
document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 28) 
document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 29) 
document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 30) 
document.write("<bgsound src=song3.mid width=145 height=30 autostart=true loop=-1 volume=50>");

if (page.getDate() == 31) 
document.write("<bgsound src=x-song3.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+"日."+"播放"+ lmonth + date+"日"+"的音乐")

//-->


</SCRIPT></td></tr>
</table></center>
   
<br>
<br>
<center>
<textarea name=source rows=12 cols=45 class=yk9>
脚本说明:
把如下代码加入<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>
</textarea>
<SCRIPT LANGUAGE="JavaScript">

<!-- hide

function goHist(a) 

{

   history.go(a);

}

//-->

</script>

<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">
</form>
</center>
<br>
<br>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -