『文章正文』

qq浮动广告+客服qq代码

来源:厦门电脑维修维护网 作者:mrakey 日期:2007-07-08 字体:[ ] 发表文章 | 发表评论

<!-- qq浮动广告开始 -->
<script>

    var delta=0.15
    var collection;
    function floaters() {
        this.items    = [];
        this.additem    = function(id,x,y,content)
                  {
                    document.write('<div id='+id+' style="z-index: 10; position: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</div>');
                   
                    var newitem                = {};
                    newitem.object            = document.getelementbyid(id);
                    newitem.x                = x;
                    newitem.y                = y;

                    this.items[this.items.length]        = newitem;
                  }
        this.play    = function()
                  {
                    collection                = this.items
                    setinterval('play()',10);
                  }
        }
        function play()
        {
            if(screen.width<=800)
            {
                for(var i=0;i<collection.length;i++)
                {
                    collection[i].object.style.display    = 'none';
                }
                return;
            }
            for(var i=0;i<collection.length;i++)
            {
                var followobj        = collection[i].object;
                var followobj_x        = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
                var followobj_y        = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

                if(followobj.offsetleft!=(document.body.scrollleft+followobj_x)) {
                    var dx=(document.body.scrollleft+followobj_x-followobj.offsetleft)*delta;
                    dx=(dx>0?1:-1)*math.ceil(math.abs(dx));
                    followobj.style.left=followobj.offsetleft+dx;
                    }

                if(followobj.offsettop!=(document.body.scrolltop+followobj_y)) {
                    var dy=(document.body.scrolltop+followobj_y-followobj.offsettop)*delta;
                    dy=(dy>0?1:-1)*math.ceil(math.abs(dy));
                    followobj.style.top=followobj.offsettop+dy;
                    }
                followobj.style.display    = '';
            }
        }   
       
    var thefloaters        = new floaters();
        thefloaters.additem('followdiv1','document.body.clientwidth-106',80,'<a href=#  target=_blank> <a href="http://wpa.qq.com/msgrd?v=1&amp;uin=83744378&amp;site=www.fx365.com.cn&amp;menu=yes" target=blank><img src=/images/qq/qq1.gif alt=客服qq border=0></a><br><br><a href="http://wpa.qq.com/msgrd?v=1&amp;uin=125146711&amp;site=www.fx365.com.cn&amp;menu=yes" target=blank><img src=/images/qq/qq1.gif alt=qq在线技术支持 border=0></a>');
    thefloaters.additem('followdiv2',6,80,'<a href="http://wpa.qq.com/msgrd?v=1&amp;uin=19325450&amp;site=www.fx365.com.cn&amp;menu=yes" target=blank><img src=/images/qq/qq1.gif alt=客服qq border=0></a><br><br><a href=http://wpa.qq.com/msgrd?v=1&amp;uin=121929982&amp;site=www.fx365.com.cn&amp;menu=yes"  target=_blank><img src=/images/qq/qq2.gif alt=qq在线技术支持 border=0><br>');
    thefloaters.play();

</script>
<!-- qq浮动广告结束 -->

用户名: 邮箱:
评论内容:不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
文章搜索
相关文章
  • 暂时没有相关新闻!
 网站首页 -  网站地图 -  关于我们 -  网站设计 -  联系方式 -  在线咨询 -  技术论坛 -  设为首页 -  收藏本站
厦门电脑维修维护网(www.fx365.com.cn) 地址:厦门前埔南区古兴里6号505 电话:0592-8424711/5021562 传真:0592-5913841
copyright © 2005 - 2008 www.fx365.com.cn inc. all rights reserved 网站备案号:闽icp备05017658号
链接及市场合作qq:83744378、125146711 e-mail:fx365@fx365.com.cn