解决IE6中固定定位问题(代码)

 /**
    * 传对象进来,第二个参数为距离底边的距离,能够不传,new一个出去执行this.move()就能够了
    * 好比 window.onscroll = function(){ a.move()}
    * @param obj   对象必须传递
    * @param bottom 选择传递 对象距离浏览器下方的距离
    */
   function rightSusBox(obj,bottom){
       var timer = null;
       this.bottom = 0;
       if(arguments.length==2){
           this.bottom = bottom;
       }
       this.move = function(){
           var scrollTop = document.documentElement.scrollTop||document.body.scrollTop;
           var iTarget = scrollTop + document.documentElement.clientHeight - this.bottom - obj.offsetHeight;
           clearInterval(timer);
           timer = setInterval(function(){
               var speed = (iTarget - obj.offsetTop)/6;
               speed = speed>0?Math.ceil(speed):Math.floor(speed);
               if(iTarget==obj.offsetTop){
                   clearInterval(timer);
               }else{
                   obj.style.top = obj.offsetTop + speed + 'px';
               }
           },30);
       };
       this.move();

   } 浏览器

在移动过程当中,对象会呈现缓冲运动效果 this