惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
宝玉的分享
宝玉的分享
月光博客
月光博客
B
Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
博客园_首页
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
A
About on SuperTechFans
Y
Y Combinator Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
D
Docker
爱范儿
爱范儿
博客园 - 司徒正美
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net

博客园 - joinsky

asp.net下载代码 - joinsky - 博客园 必须会的十种语言 df 有关程序员的传说 网站标准 asp.net中的DES加密 ASp.net中的定位问题. - joinsky - 博客园 文字的竖排与横排 - joinsky - 博客园 两个常用的存储过程(转) iframe自适应网页内容的高度 - joinsky - 博客园 IErrorInfo.GetDescription 因 E_FAIL(0x80004005) 而失败 javascript中object转换为string 数据库中游标的使用.....用于循环 网页技巧之如何隐藏状态栏里出现的LINK信息 页面过长自动进行分页(转) 自定义组件的执行周期(转) 调用DLL中的方法(转) vs2003问题集锦 HTTP/1.1 500 Internal Server Error 解决方法
随页面滚动的层(转)
joinsky · 2006-06-13 · via 博客园 - joinsky

drop.js文件的内容
self.onError=null;   
currentX = currentY = 0;   
whichIt = null;   
lastScrollX = 0; //最后离左边距离的负值
lastScrollY =0;  //最后离顶部的高度的负值
 
//----------------------start fun秒执行一次  
function heartBeat(id1,id2) {   
diffY = document.body.scrollTop;
diffX = document.body.scrollLeft;

if(diffY != lastScrollY) {   
percent = .1 * (diffY - lastScrollY);   
if(percent > 0) percent = Math.ceil(percent);   
else percent = Math.floor(percent);   
id1.style.pixelTop += percent;
id2.style.pixelTop += percent;  
lastScrollY = lastScrollY + percent;   
}   

if(diffX != lastScrollX) {   
percent = .1 * (diffX - lastScrollX);   
if(percent > 0) percent = Math.ceil(percent);   
else percent = Math.floor(percent);   
id1.style.pixelTop += percent;
id2.style.pixelTop += percent;     
lastScrollX = lastScrollX + percent;   
}   
}   
//-----------------------end fun
scr=screen.width
left_1=(scr>800)?10:145
right_1=(scr>800)?880:580

//左侧图片
document.write("<DIV id=f1 style='left: "+left_1+"px; top: 460px; POSITION: absolute;'><a href='#' target=_blank><img src='041.gif' border=0 width=120 height=125></a></div>")

//右侧图片
document.write("<DIV id=f2 style='left: "+right_1+"px; top: 215px; POSITION: absolute;'><a href='#' target=_blank><img src='011.gif' border=0 width=150 height=47></a></div>")

action = window.setInterval("heartBeat(f1,f2)",1);  

1.html代码:
<html>
<head>
<script src="drop.js" language="javascript">
</script>
</head>
<body>
<table>
 <tr>
  <td height=10278px>
  </td>
 </tr>

</table>
asdf
</body>
</html>