如何落伍 | 站长俱乐部 | 落伍预告 | 落伍分类 | 站长运营 | 站长赚钱 | 免费代码 | 现金任务 | 人才招聘 | 落伍DIY | 帐号异常申诉! | 站长工具
推荐:图铃+艺术签名效果强!年底暴利,淘宝CPC1000ip/50元弹窗,点击,自定义多种广告 强力推荐:签名+Q号.无线金玉
天寻租用699/月 空间30/月赠CDN域名1元 空间10元 真百独999起!独立IP空间 免费赠送CDN 180¥起51联盟轻松月赚1万!(信誉第一)
挚盟:签名+杀毒+考考你英拓0元送机托管活动服务器也可以合租188每月10M独享租用550元-合租80/月
DNSPod智能DNS,我们一直在免费莆阳E7200/2G/250G 月付699元双线独立IP主机 上海电信托管4500腾佑丽水电信10G高防,租用599元/月起
发新话题
打印

[提问] 对联代码好像无效,没有显示

对联代码好像无效,没有显示

js:

    var delta=0.8;
    var collection;
    var closeB=false;
    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()',30);
                  }
        }
        function play()
        {
            if(screen.width<=800 || closeB)
            {
                for(var i=0;i<collection.length;i++)
                {
                    collection.object.style.display    = 'none';
                }
                return;
            }
            for(var i=0;i<collection.length;i++)
            {
                var followObj        = collection.object;
                var followObj_x        = (typeof(collection.x)=='string'?eval(collection.x):collection.x);
                var followObj_y        = (typeof(collection.y)=='string'?eval(collection.y):collection.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    = '';
            }
        }   
        function closeBanner()
        {
            closeB=true;
            return;
        }

    var theFloaters        = new floaters();
    //
    theFloaters.addItem('followDiv1','document.body.clientWidth-106',50,'<iframe src=1.htm marginwidth=0 marginheigh=0 hspace=0 vspace=0 frameborder=0 width=106 height=310 scrolling=NO></iframe>');
    theFloaters.addItem('followDiv2',0,50,'<iframe src=1.htm marginwidth=0 marginheigh=0 hspace=0 vspace=0 frameborder=0 width=106 height=310 scrolling=NO></iframe>');
    theFloaters.play();



但是js调用后没有反映阿。。

TOP

???????

TOP

TOP

发新话题