ff下style.top需要写成parseInt(percent) + "px";的
其它的没看出来, 加断点测试下就知道是那里不符合规范了

解决方案 »

  1.   

    var specialcode="<div id='qqkf' style=' border:solid 1px #cccccc; width:100px;Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 30px;'><table border='0' cellpadding='0' cellspacing='4' width='100'><tr><td width='25' align='right'><a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=3245121&Exe=QQ&Site=im.qq.com&Menu=No'><img border='0' SRC='http://wpa.qq.com/pa?p=1:3245121:4' alt='给我发消息'></a></td><td><a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=3245121&Exe=QQ&Site=im.qq.com&Menu=No'>在线客服</a></td></tr><tr><td width='25' align='right'>    <a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1059390530&Exe=QQ&Site=im.qq.com&Menu=No'><img border='0' SRC='http://wpa.qq.com/pa?p=1:1059390530:4' alt='给我发消息'></a></td><td><a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1059390530&Exe=QQ&Site=im.qq.com&Menu=No'>在线客服</a></td></tr></table></div>"; document.write(specialcode); 
    var lastScrollX=0;function cfsclw(){ 
        var top1 = parseInt(document.getElementById("qqkf").style.top);
        diffY=document.documentElement.scrollTop; 
        percent=.1*(diffY-lastScrollX); 

        percent = percent>0 ? Math.ceil(percent) : percent=Math.floor(percent)
    document.getElementById("qqkf").style.top = top1 + parseInt(percent) + 'px';
    lastScrollX = lastScrollX + parseInt(percent);
    }
    window.setInterval("cfsclw()",1000);
      

  2.   

    重发下,上面有点囧。
    var specialcode="<div id='qqkf' style=' border:solid 1px #cccccc; width:100px;Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 30px;'><table border='0' cellpadding='0' cellspacing='4' width='100'><tr><td width='25' align='right'><a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=3245121&Exe=QQ&Site=im.qq.com&Menu=No'><img border='0' SRC='http://wpa.qq.com/pa?p=1:3245121:4' alt='给我发消息'></a></td><td><a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=3245121&Exe=QQ&Site=im.qq.com&Menu=No'>在线客服</a></td></tr><tr><td width='25' align='right'>    <a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1059390530&Exe=QQ&Site=im.qq.com&Menu=No'><img border='0' SRC='http://wpa.qq.com/pa?p=1:1059390530:4' alt='给我发消息'></a></td><td><a target='_blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1059390530&Exe=QQ&Site=im.qq.com&Menu=No'>在线客服</a></td></tr></table></div>"; document.write(specialcode); 
    var lastScrollX=0;function cfsclw(){ 
        var top1 = parseInt(document.getElementById("qqkf").style.top);
        diffY=document.documentElement.scrollTop; 
        percent=.1*(diffY-lastScrollX); 
        
        percent = percent>0 ? Math.ceil(percent) : Math.floor(percent);
        document.getElementById("qqkf").style.top = top1 + parseInt(percent) + 'px';
        lastScrollX = lastScrollX + parseInt(percent);
    }
    window.setInterval("cfsclw()",1000);