这段代码怎么用啊

来源:百度知道 编辑:UC知道 时间:2024/09/24 19:20:07
是移动对联的代码
<SCRIPT>
suspendcode="<DIV id=yuzi style='left:5px;POSITION:absolute;TOP:350px;'><a href='/news/news_detail.asp?id=2325' ><img src='images/lwaidi.gif' border=0></a></div>"
suspendcode1="<DIV id=yuzi1 style='right:5px;POSITION:absolute;TOP:350px;'><a href='/news/newslist.asp?class=18' ><img src='images/laugh.gif' border=0></a></div>"
document.write(suspendcode);
document.write(suspendcode1);
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.yuzi.style.pixelTop+=percent;
document.all.yuzi1.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
window.setInterval("heartBeat()",1);
</script>

<SCRIPT>
suspendcode="<DIV id=yuzi style='left:5px;POSITION:absolute;TOP:350px;'><a href='这里填入你左侧广告要链接的页面' ><img src='这里填入你左侧广告的图片路径' border=0></a></div>"
suspendcode1="<DIV id=yuzi1 style='right:5px;POSITION:absolute;TOP:350px;'><a href='这里填入你右侧广告要链接的页面' ><img src='这里填入你右侧广告的图片路径' border=0></a></div>"
document.write(suspendcode);
document.write(suspendcode1);
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.yuzi.style.pixelTop+=percent;
document.all.yuzi1.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
window.setInterval("heartBeat()",1);
</script>

需要改的地方给你标出来了.其它地方不用改动就可以用.下面部