<bgsound src=http://gg.a.5d6d.com/userdirs/b/2/kym/attachments/month_0802/20080202_cb4498e8666b988861d2lebQ692OVHJJ.attach loop="-1">點擊關閉背景我想做這樣的效果

解决方案 »

  1.   

    简单处理,使用音量控制即可!L@_@K
    <!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>
        <title> new document </title>
        <meta name="generator" content="editplus" />
        <meta name="author" content="Gao YiXiang" />
        <meta name="email" content="[email protected]" />
        <meta name="keywords" content="javascript dhtml dom" />
        <meta name="description" content="I love web development." />
        <style type="text/css">
    html, body
    {
        height: 100%;
        margin: 0px 0px 0px 0px;
    }
        </style>
    </head>
    <body>
        <h3>单击关闭背景音乐,再次单击重新打开!注:IE6sp1 测试可用,FF2 无效!</h3>
        <bgsound src="20080202_cb4498e8666b988861d2lebQ692OVHJJ.attach.mid" loop="-1">
    </body>
    <script type="text/javascript">
    <!--
    document.body.bgSound = document.getElementsByTagName("bgsound")[0];
    document.body.onclick = function()
    {
        var iSilence = -10000;
        var iNormal = -600;
        if (this.bgSound.volume == iSilence)
        {
            this.bgSound.volume = iNormal;
        }
        else
        {
            this.bgSound.volume = iSilence;
        }
    };
    //-->
    </script>
    </html>
      

  2.   

    那么embed可以嗎?
    我想支持Firefox..
      

  3.   

    FF俺用滴不多,google了一下,可以这么写
    <embed src="20080202_cb4498e8666b988861d2lebQ692OVHJJ.attach.mid" width=50 height=15 autostart=true align=right repeat=true>
    俺试验了一下,FF下会提示安装QuickTime插件,lz再试试看吧!参考下文:
    Subject: Embedded sound loops in Firefox
    http://www.computing.net/webdevel/wwwboard/forum/1279.html
    送你三本手册!DHTML参考手册
    http://download.csdn.net/source/308913样式表中文手册
    http://download.csdn.net/source/304124JScript语言参考
    http://download.csdn.net/source/308916