本节内容:
Js对联广告代码
例子:
复制代码 代码示例:
标准对联广告Js代码 – www.jquerycn.cn
lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById(“lovexin12”).style.top=parseInt(document.getElementById
(“lovexin12″).style.top)+percent+”px”;
document.getElementById(“lovexin14”).style.top=parseInt(document.getElementById
(“lovexin12″).style.top)+percent+”px”;
lastScrollY=lastScrollY+percent;
}
suspendcode12=”
”
suspendcode14=”
”
document.write(suspendcode12);
document.write(suspendcode14);
window.setInterval(“heartBeat()”,1);
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/201724.html原文链接:https://javaforall.net
