执行这个文件打开文本后,有背景音乐循环播放,请帮助解决!!!
存为.htm文件
<html>
<head><title>MusicText</title></head>
<body>
<embed src="song.mp3" loop=true autostart=true name=bgss width=0 height=0>
你的文本内容............
</body>
</html>
存为.htm文件
<html>
<head><title>MusicText</title></head>
<body>
<embed src="song.mp3" loop=true autostart=true name=bgss width=0 height=0>
你的文本内容............
</body>
</html>
同意这个意见
每次刷新都会随机选择背景音乐。有20首。
<SCRIPT language="JavaScript">
<!--
var sound1="music/song1.mid"
var sound2="music/song2.mid"
var sound3="music/song3.mid"
var sound4="music/song4.mid"
var sound5="music/song5.mid"
var sound6="music/song6.mid"
var sound7="music/song7.mid"
var sound8="music/song8.mid"
var sound9="music/song9.mid"
var sound10="music/song10.mid"
var sound11="music/song11.mid"
var sound12="music/song12.mid"
var sound13="music/song13.mid"
var sound14="music/song14.mid"
var sound15="music/song15.mid"
var sound16="music/song16.mid"
var sound17="music/song17.mid"
var sound18="music/song18.mid"
var sound19="music/song19.mid"
var sound20="music/song20.mid"
var x=Math.floor(Math.random()*21)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else if (x==4) x=sound5
else if (x==5) x=sound6
else if (x==6) x=sound7
else if (x==7) x=sound8
else if (x==8) x=sound9
else if (x==9) x=sound10
else if (x==10) x=sound11
else if (x==11) x=sound12
else if (x==12) x=sound13
else if (x==13) x=sound14
else if (x==14) x=sound15
else if (x==15) x=sound16
else if (x==16) x=sound17
else if (x==17) x=sound18
else if (x==18) x=sound19
else x=sound20
if (navigator.appName=="Microsoft Internet Explorer")
document.write(<bgsound src=+"+x+"+ loop="infinite">)
else
document.write(<embed src=+"+x+"+hidden="true" border="0" width="20" height="20" autostart="true" loop="true">)
//-->
</SCRIPT>