日期:2014-05-16  浏览次数:20566 次

我做的网页两边的广告条,在傲游浏览器中,滚动的时候为什么会突然不见了呢
我做的网页两边的广告条,在傲游浏览器中,滚动的时候为什么会突然不见了呢,在其他浏览器中都是正常的  
我的代码如下:
<script   language= "JavaScript ">
function   showw(num)
{
    document.all.div1.style.display= 'none ';
    document.all.div2.style.display= 'none ';
    eval( "document.all.div "+num+ ".style.display= 'block ' ");
}
function   sc1(){
  document.all.div1.style.display= "block ";
  document.getElementById( "Javascript.Div ").style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight-document.getElementById( "Javascript.Div ").offsetHeight)/6)+ "px ";
  if((document.documentElement.clientWidth)==1024||(document.documentElement.clientWidth) <1024)
  {
          document.getElementById( "div1 ").style.left=900+ "px ";
  document.getElementById( "div2 ").style.left=850+ "px ";
  }
  if((document.documentElement.clientWidth)> 1024)
  {
  document.getElementById( "Javascript.Div ").style.left=(document.documentElement.scrollLeft+((document.documentElement.clientWidth-document.getElementById( "Javascript.Div ").offsetWidth)-900)/2+850)+ "px ";
  }
}
function   scall(){
  sc1();
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;
</script>
以下是body里面的内容
<div   id= "Javascript.Div "   name= "Javascript.Div "   class= "div "   align= "center "   style= "width:100px; ">
<div   class= "div "   id= "div1 "   name= "div1 "   style= "display:block;   width:50px;   text-align:right;   background-color:transparent; ">
    <a   href= "JavaScript:showw(2); "> <img   src= "images/small.gif "   height= "90 "   border= "0 "   /> </a>
</div>
<div   class= "div "   id= "div2 "   name= "div2 "   style= "display:none;   background-color:transparent; ">
</div>


------解决方案--------------------
浮动广告会被屏掉,只要广告放着不动就没事了。
或许用setTimeout来却定位置可能也不会被屏掉。