我网站的浮动广告在普通的模式下 上下可自由浮动 在搜狗浏览器的高速模式下 就停在那一动不动 很不好看,请大家帮忙解决一下 ​

我的左浮动JS代码​ if (navigator.appName == "Netscape") 
document.ns = navigator.appName == "Netscape" 
window.screen.width>800 ? imgheight=560:imgheight=550 
window.screen.width>800 ? imgleft=20:imgleft=30 function threenineload_L() { 
if (navigator.appName == "Netscape") 
{document.DGbanner10.pageY=pageYOffset+window.innerHeight-imgheight; 
document.DGbanner10.pageX=imgleft; threeninemove_L(); } else { 
DGbanner10.style.top=document.documentElement.scrollTop+document.documentElement.offsetHeight-imgheight; 
DGbanner10.style.left=imgleft; threeninemove_L(); } } 
function threeninemove_L() { if(document.ns) { 
document.DGbanner10.top=pageYOffset+window.innerHeight-imgheight 
document.DGbanner10.left=imgleft; setTimeout("threeninemove_L();",80) } else { 
DGbanner10.style.top=document.documentElement.scrollTop+document.documentElement.offsetHeight-imgheight; 
DGbanner10.style.left=imgleft; setTimeout("threeninemove_L();",80) } } 
function MM_reloadPage_L(init) { //reloads the window if Nav4 resized 
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { 
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} 
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); 
} MM_reloadPage_L(true) threenineload_L() 

解决方案 »

  1.   

    我只知道webkit内核不认识document.documentElement.scrollTop,要用document.body.scrollTop。可能会对你有所帮助。
      

  2.   

    原来就是document.body.scrollTop  不滚动 换了document.documentElement.scrollTop才滚动
      

  3.   

    Math.max(document.body.scrollTop ,document.documentElement.scrollTop)
      

  4.   

    px单位加上,要不css1compat下没有单位设置top,left没用,楼主去看下css的position:fixed,ie6-才用js移动浮动对象if (navigator.appName == "Netscape") 
    document.ns = navigator.appName == "Netscape" 
    window.screen.width>800 ? imgheight=560:imgheight=550 
    window.screen.width>800 ? imgleft=20:imgleft=30 
    function threenineload_L() { 
    if (navigator.appName == "Netscape") 
    {document.DGbanner10.pageY=pageYOffset+window.innerHeight-imgheight; 
    document.DGbanner10.pageX=imgleft; threeninemove_L(); } else { 
    DGbanner10.style.top=Math.max(document.body.scrollTop ,document.documentElement.scrollTop)+document.documentElement.offsetHeight-imgheight+'px'; 
    DGbanner10.style.left=imgleft+'px'; threeninemove_L(); } } 
    function threeninemove_L() { if(document.ns) { 
    document.DGbanner10.top=pageYOffset+window.innerHeight-imgheight 
    document.DGbanner10.left=imgleft; setTimeout("threeninemove_L();",80) } else { 
    DGbanner10.style.top=Math.max(document.body.scrollTop ,document.documentElement.scrollTop)+document.documentElement.offsetHeight-imgheight+'px'; 
    DGbanner10.style.left=imgleft+'px'; setTimeout("threeninemove_L();",80) } } 
    function MM_reloadPage_L(init) { //reloads the window if Nav4 resized 
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { 
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} 
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); 

    MM_reloadPage_L(true)
    threenineload_L() 
      

  5.   

    var val = document.body.scrollTop||document.documentElement.scrollTop;
    这样吧。
      

  6.   

    var val = document.body.scrollTop||document.documentElement.scrollTop;
    这种写法的话,在firefox上面木有用处了!!