超级急...我的div怎么不动了????

yyxu123 2007-05-29 04:59:45



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1"><title>
产品信息展示
</title>
<SCRIPT LANGUAGE="JavaScript">
var showad = true;
var Toppx = 100; //上端位置
var AdDivW = 30; //宽度
var AdDivH = 300; //高度
var PageWidth = 780; //页面多少宽度象素下正好不出现左右滚动条
var MinScreenW = 1024; //显示广告的最小屏幕宽度象素

function scall()
{
if(!showad)
{
return;
}
if (window.screen.width<MinScreenW)
{
showad = false;
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
return;
}
var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2;

document.getElementById("Javascript.LeftDiv").style.display="";
document.getElementById("Javascript.LeftDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx;
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.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
}
</SCRIPT>
</head>
<body class="margin" onscroll="scall()" onresize="scall()" onload="scall()">
<form name="form1" method="post" action="Finance.aspx" id="form1">



<div id="Javascript.RightDiv" style="position:absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:100px;height:300px;top:-1000px;word-break:break-all;display:none;">
<div align="right" style="background-image: url(../Images/GrayExplorer.gif);position:absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;">
 <Img ID="Image4" src="../Images/arrow_sand_beveled.gif" Width="5" Height="8px" />

<strong>最新公告</strong><span onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;cursor:pointer">关闭</span>
</div>
<div><table border="0">
<tr>
<td>  </td>
</tr>
<tr>
<td style="width: 200px; height: 1px; background-color: #cccccc">
 
</td>
</tr>
<tr>
<td style="width: 3px; height: 82px">
test<br/>
test<br/>
test<br/>
test<br/>
test<br/>
test<br/>test<br/>test
</td>
</tr>
</table>
</div>
</div>

<div id="Javascript.LeftDiv" style="position:absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:100px;height:300px;top:-1000px;word-break:break-all;display:none;">
<div align="right" style="background-image: url(../Images/GrayExplorer.gif);position:absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;">
 <Img ID="Img1" src="../Images/arrow_sand_beveled.gif" Width="5" Height="8px" />
<span onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;cursor:pointer">关闭</span>
</div>

<div><br><table border="0">

<tr>
<td style="background-image: url(../Images/GrayExplorer.gif); width: 200px; height: 22px" align="left">
 <img id="Image5" src="../Images/arrow_sand_beveled.gif" style="height:8px;width:5px;border-width:0px;" />
<strong>资讯服务</strong></td>
</tr>
<tr>
<td style="width: 200px; height: 1px; background-color: #cccccc">
</td>
</tr>
<tr>
<td style="width: 3px; height: 85px">
test<br/>
test<br/>
test<br/>
test<br/>
test<br/>
test<br/>test<br/>test
</td>
</tr>
</table></div>
</div>

<div>

</form>
test<br/>
</body>
</html>
...全文
189 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zabcd117 2007-05-30
  • 打赏
  • 举报
回复
我测试了,动的啊
adverse 2007-05-29
  • 打赏
  • 举报
回复
document.body.scrollTop它的值一直是0.
yyxu123 2007-05-29
  • 打赏
  • 举报
回复
???没有人啊?

87,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧