<!--右侧浮动-->
<script src="js/fudong.js" type="text/javascript"></script>
<DIV id=lovexin style="Z-INDEX: 10; RIGHT: 0px; POSITION: absolute; TOP: 0px"><IMG src="images\bj_link.jpg" alt="" width=99 height=474 border=0 useMap=#Map>
<MAP name=Map>
<AREA shape=RECT coords=15,5,82,24 href="http://www.bb-jj.com/" target="_parent">
<AREA shape=RECT coords=15,49,82,68 href="http://www.bb-jj.com/bbs" target="_blank">
<AREA shape=RECT coords=15,27,82,46 href="#top">
</MAP>
</DIV>
保存為fudong.js或者直接寫進去- 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.lovexin.style.pixelTop+=percent;
- lastScrollY=lastScrollY+percent;
- }
- window.setInterval('heartBeat()',1);
复制代码 |