<style type="text/css">
#main{text-align:center; background-color:#9FF; height:600px;width:800px}
#adver{
position:absolute;
left:50px;
top:30px;
z-index:;
}
</style>
<script src="js/scroll.js"></script>
</head>
<body>
<div id="adver"><img src="data:images/adv.jpg"/></div>
<div id="testDiv" style="position:absolute;left:300px;top:50px;background-color:red; width:80px; height:200px">内部样式的div</div>
<input type="button" value="测试内部样式坐标位置" onClick="test('testDiv')"/>
<input type="button" value="测试外部样式坐标位置" onClick="test('adver')"/>
<div id="main">网页内容</div>
</body>