背景音乐每次刷新都可以自动更换


<SCRIPT LANGUAGE="javascript">
<!--
var sound1="http://歌曲地址"
var sound2="http://歌曲地址"
var sound3="http://歌曲地址"
var sound4="http://歌曲地址"
var sound5="http://歌曲地址"
var sound6="http://歌曲地址"
var sound7="http://歌曲地址"
var sound8="http://歌曲地址"
var sound9="http://歌曲地址"
var sound10="http://歌曲地址"
var x=Math.round(Math.random()*10)
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 x=sound10
if (navigator.appName=="Microsoft Internet Explorer"
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" autostart="true" loop="true">')
//-->
</SCRIPT>


Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=348256


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3