Home > php教程 > php手册 > javascript对联广告 兼容 IE FF

javascript对联广告 兼容 IE FF

WBOY
Release: 2016-06-06 20:00:58
Original
1402 people have browsed it

// JavaScript Document lastScrollY=0; function heartBeat(){ var diffY; if (document.documentElement document.documentElement.scrollTop) diffY = document.documentElement.scrollTop; else if (document.body) diffY = document.body.scrollTop els

// JavaScript Document
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="

javascript对联广告 兼容 IE FF
javascript对联广告 兼容 IE FF
"

suspendcode14="

javascript对联广告 兼容 IE FF
javascript对联广告 兼容 IE FF
"

document.write(suspendcode12);
document.write(suspendcode14);
window.setInterval("heartBeat()",1);

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template