谁有js 对联广告效果 带关闭(大图和小图隐藏的那种) 带滚动  就是我点击大图显示小图 点击小图显示大图 并且带有滚动效果

解决方案 »

  1.   

    很多网上有哦,你可以用firebug或是查看源代码。进行复制
      

  2.   

    var m_layer1,m_layer2;
    function initMove() {
     m_layer1=document.getElementById("AdLayer1");
     m_layer2=document.getElementById("AdLayer2");
     m_layer1.style.top = "-200px";
     m_layer1.style.visibility = 'visible'
     m_layer2.style.top = "-200px";
     m_layer2.style.visibility = 'visible'
     MoveLayers();
     window.onscroll=MoveLayers;
    }
    function MoveLayers() {
     var x = 5; // 左右边距
     var y = 100; // 顶距
     var st=document.documentElement.scrollTop;
     var cw=document.documentElement.clientWidth;
     var y = st + y;
     m_layer1.style.top = y+"px";
     m_layer1.style.left = x+"px";
     m_layer2.style.top = y+"px";
     m_layer2.style.left = cw-m_layer2.clientWidth-x+"px";
    }
    window.setTimeout("initMove()",600);
    //-->
    </script><div id='AdLayer1' style='position: absolute;visibility:hidden;z-index:1'><a href="http://www.iwms.net/buy"><img src='http://www.iwms.net/buy/pic/product_6.gif' border='0'></a></div>
    <div id='AdLayer2' style='position:absolute;visibility:hidden;z-index:1'><a href="http://www.iwms.net/buy"><img src='http://www.iwms.net/buy/pic/product_8.gif' border='0'></a></div><div align="center" style="height:2000px">
     <h3>对联效果</h3>
     <br/><br/>