标题:谁能帮忙把这段JS代码改成Firefox兼容的图片渐隐渐显效果
只看楼主
xiaobaigou2008
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2008-6-29
 问题点数:0 回复次数:2 
谁能帮忙把这段JS代码改成Firefox兼容的图片渐隐渐显效果
JS部分
<script language="javascript" type="text/javascript">
    var NowFrame = 1;
    var MaxFrame = 4;
    var bStart = 0;
    function fnToggle() {
        var next = NowFrame + 1;
        if (next == MaxFrame + 1) {
            NowFrame = MaxFrame;
            next = 1;
        }
        if (bStart == 0) {
            bStart = 1;

            setTimeout('fnToggle()', 1000);
            return;
        }
        else {
            oTransContainer.filters[0].Apply();
            document.images['oDIV' + next].style.display = "";
            document.images['oDIV' + NowFrame].style.display = "none";
            oTransContainer.filters[0].Play(duration = 5);
            if (NowFrame == MaxFrame)
                NowFrame = 1;
            else
                NowFrame++;
        } setTimeout('fnToggle()', 6000);
    }
    fnToggle();
</script>

HTML部分
 <div  id="oTransContainer" style="FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0, wipeStyle=0, motion='forward')";>
               <img id="oDIV1" style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: yes;  BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid"  src="images/left_pic1.jpg" border=0>
<img id="oDIV2" style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: none; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid"  src="images/left_pic2.jpg" border=0>
<img id="oDIV3" style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: none; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid"  src="images/left_pic3.jpg" border=0>
<img id="oDIV4" style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; DISPLAY: none; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid"  src="images/left_pic4.jpg" border=0>

            </div>
搜索更多相关主题的帖子: 代码 效果 Firefox 
2009-11-25 17:23
xiaobaigou2008
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2008-6-29
得分:0 
或者直接给一个全兼容的也可以 谢谢啦!
2009-11-25 17:24
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
得分:0 
滤镜是ie only
2009-11-30 09:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-293369-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.929273 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved