您的位置:首页 > 编程语言

浮动广告对联代码

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: