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

[ 2007-11-17 12:39:43 | 作者: Admin ] 字号: | |
<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='http://dev.csdn.net/article/+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='http://dev.csdn.net/article/+'"'+x+'"'+'hidden="true" autostart="true" loop="true">')
//-->
</SCRIPT>
Share
评论Feed 评论Feed: http://www.85815.com/feed.asp?q=comment&id=98
UTF-8 Encoding 引用链接: http://www.85815.com/trackback.asp?id=98&key=
这篇日志没有评论.
发表
表情图标
[smile] [confused] [cool] [cry]
[eek] [angry] [wink] [sweat]
[lol] [stun] [razz] [redface]
[rolleyes] [sad] [yes] [no]
[heart] [star] [music] [idea]
UBB代码
转换链接
表情图标
悄悄话
用户名:   密码:   注册?
验证码 * 请输入验证码