魔兽世界 7.3补丁:随滚动条滚动图片为何首页显示不了?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 23:19:17
我做了一个首页滚动的图片,可在别的页面都能调用,且正常,但在主页里却不能随滚动条滑动了。急需答案。。是哪方面的问题呢?主页css吗?还是什么?那个滚动代码肯定没问题撒。。
附代码:
<SCRIPT LANGUAGE="javascript">
<!--
var showad = true;
var Toppx = 360; //上端位置
var AdDivW = 130; //宽度
var AdDivH = 130; //高度
var PageWidth = 800; //页面多少宽度象素下正好不出现左右滚动条
var MinScreenW = 1024; //显示广告的最小屏幕宽度象素
var AdContentHtml1 = '<div align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td></td></tr></table></div>';//设置右广告
document.write ('<div id="javascript.RightDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+'<div>'+AdContentHtml1+'</div></div>');
function scall(){
if(!showad){return;}
if (window.screen.width<MinScreenW){
alert("临时提示:\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告");
showad = false;
document.getElementById("javascript.RightDiv").style.display="none";
return;
}
var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2;

document.getElementById("javascript.RightDiv").style.display="";
document.getElementById("javascript.RightDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("javascript.RightDiv").offsetWidth-Borderpx;
}

function hidead()
{
showad = false;
document.getElementById("javascript.RightDiv").style.display="none";
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;
//-->
</SCRIPT>