<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <!-- saved from url=(0025)http://ad.jz123.cn/ad/33/ --> <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>div+css实现的两侧浮动广告JS代码-CSS在线</TITLE> <META http-equiv=Content-Type content="text/html; charset=gb2312"> <META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD> <BODY> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P> </P> <P></P> <script language="javascript"> 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*/} //alert(diffY); 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; //alert(lastScrollY); } suspendcode12="<DIV id=/"lovexin12/" style='left:22px;POSITION:absolute;TOP:69px;'><a href='http://www.csscss.org' target='_blank'><img border=0 src=/UploadFile/ad_1.gif><br><a href=JavaScript:; οnclick=/"lovexin12.style.visibility='hidden'/"><img border=0 src=/UploadFile/close.gif></a></div>" suspendcode14="<DIV id=/"lovexin14/" style='right:22px;POSITION:absolute;TOP:69px;'><a href='www.csscss.org' target='_blank'><img border=0 src=/UploadFile/ad_1.gif><br><a href=JavaScript:; οnclick=/"lovexin14.style.display = 'none'/"><img border=0 src=/UploadFile/close.gif></div>" document.write(suspendcode12); document.write(suspendcode14); window.setInterval("heartBeat()",1); </script> <DIV style="DISPLAY: none"> </DIV></BODY></HTML>