78、按浏览器选择背景音乐

78、按浏览器选择背景音乐

脚本说明:

<body>中的内容改为:

<SCRIPT LANGUAGE="JavaScript">

var MSIE=navigator.userAgent.indexOf("MSIE");

var NETS=navigator.userAgent.indexOf("Netscape");

var OPER=navigator.userAgent.indexOf("Opera");

if((MSIE>-1)||(OPER>-1))

{

document.write("<BGSOUND SRC=sound.mid LOOP=INFINITE>");

}

else

{

document.write("<EMBED SRC=sound.mid AUTOSTART=TRUE ");

document.write("HIDDEN=true VOLUME=100 LOOP=TRUE>");

}</script>

 

Write a comment

Comments: 0