浮动广告对联代码
2006-11-14 17:43
302 查看
<SCRIPT language=JavaScript>
lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin12.style.pixelTop+=percent;
document.all.lovexin14.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
suspendcode12="<DIV id=lovexin12 style='left:10px;POSITION:absolute;TOP:220px;'><A HREF='http://wwwqq.phphome.cn/' target=_blank Title='图片文字'><img src='图片地址' border=0 width='100' height='261'></A></div>"
document.write(suspendcode12);
suspendcode14="<DIV id=lovexin14 style='right:10px;POSITION:absolute;TOP:220px;'><A HREF='http://wwwqq.phphome.cn/' target=_blank Title='图片文字'><img src='图片地址' border=0 width='100' height='261'></A></div>"
document.write(suspendcode14);
window.setInterval("heartBeat()",1);
</SCRIPT>
lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin12.style.pixelTop+=percent;
document.all.lovexin14.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
suspendcode12="<DIV id=lovexin12 style='left:10px;POSITION:absolute;TOP:220px;'><A HREF='http://wwwqq.phphome.cn/' target=_blank Title='图片文字'><img src='图片地址' border=0 width='100' height='261'></A></div>"
document.write(suspendcode12);
suspendcode14="<DIV id=lovexin14 style='right:10px;POSITION:absolute;TOP:220px;'><A HREF='http://wwwqq.phphome.cn/' target=_blank Title='图片文字'><img src='图片地址' border=0 width='100' height='261'></A></div>"
document.write(suspendcode14);
window.setInterval("heartBeat()",1);
</SCRIPT>
相关文章推荐
- 对联浮动广告代码不滚动的解决方法
- 对联浮动广告JS代码不滚动不浮动的解决方法
- 浮动对联广告---之左侧代码
- 对联浮动广告JS代码不滚动不浮动的解决方法
- 浮动对联广告代码汇总
- 浮动对联广告代码 支持声明的漂浮代码
- 固定位置浮动广告代码(兼容IE6、IE7、FF)
- js 左右悬浮对联广告代码示例
- 浮动广告最简单代码js
- 对联广告JS代码效果大全
- 一款实用的对联广告代码
- 对联广告代码效果[鼠标感应]
- 符合标准的对联广告代码
- 右下角浮动广告代码
- 带关闭功能的Javascript对联广告代码
- 浮动广告代码
- 可关闭与最小化的右下角浮动广告代码
- css实现的对联广告代码
- jQuery 浮动广告实现代码
- js 浮动广告代码