<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title><script language="javascript">var advInitTop=document.getElementById("apDiv2").style.pixelTop;function move(){document.getElementById("apDiv2").style.pixelTop=advTnitTop+document.body.scrollTop;}
window.onscroll=move;</script></head><body>
<div id="apDiv2" style="position:absolute; left:31px; top:32px; width:140px; height:119px; z-index:1;"><img src="file:///C|/Documents and Settings/Administrator/桌面/2.jpg" width="140" height="119" /></div></body>
</html>

解决方案 »

  1.   


    <html> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>无标题文档 </title> <script language="javascript">
    var advInitTop; 
    window.onload=function(){
      advInitTop=document.getElementById("apDiv2").style.pixelTop; 
    }
    function move(){ document.getElementById("apDiv2").style.pixelTop=advInitTop+document.body.scrollTop; } 
    window.onscroll=move; </script> </head> <body> 
    <div id="apDiv2" style="position:absolute; left:31px; top:32px; width:140px; height:119px; z-index:1;"> <img src="file:///C|/Documents and Settings/Administrator/桌面/2.jpg" width="140" height="119" /> </div> </body> 
    </html>