`

页面中的背景音乐

    博客分类:
  • js
阅读更多
背景音乐实现代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <style>  
  td{font-size:20px;color:red;text-align:center}  
  </style> 
</head>
<body>
    
<SCRIPT language="JavaScript">
<!--
var sound1="http://focus.inhe.net/hebtu/zuopin/2007014047/video/39734.wma"
var sound2="http://www.yaya.668989.com/esite/yaya/200712131443447364.rm"
var sound3="http://user.yexu.net/zandy/yingyue/31020713459.wma"
var sound4="http://www.skyestar.com/regWeb/jyb3464623174/UpLoad/2007-07-06-12-31-475.mp3"
var sound5="http://www.dabaoku.com/bjyinyue/mid/5.mid"
var sound6="http://www.dabaoku.com/bjyinyue/mid/6.mid"
var sound7="http://www.dabaoku.com/bjyinyue/mid/7.mid"
var sound8="http://www.dabaoku.com/bjyinyue/mid/8.mid"
var sound9="http://www.dabaoku.com/bjyinyue/mid/9.mid"
var sound10="http://www.dabaoku.com/bjyinyue/mid/10.mid"
var x=Math.round(Math.random()*9)
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="true">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</SCRIPT>
asfdsfsdf
  </body>  
  </html>  
   

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics