中文(繁体)
顯示在1024*768下,隨滾動條而上下移動,韓國網站經常用到這種效果,不影響頁面美觀<!-- bbs http://www.downcodes.com/bbs--> <!--將下列程式碼加到<body>區域內--> <SCRIPT language=JavaScript> // more javascript from http://www.downcodes.com <!-- self.onError=null; currentX = 0; currentY = 0 ; whichIt = null; lastScrollX = 0; lastScrollY = 0; NS = (document.layers) ? 1 : 0; IE = (document.all) ? 1: 0; function heartBeat() { if(IE) { diffY = document .body.scrollTop; diffX = 0; } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != lastScrollY) { percent = .1 * (diffY - lastScrollY); if(Y) { percent = .1 * (diffY - lastScrollY); if(Y) { percent = .1 * (diffY - lastScrollY); if(Y) {if( > 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) document.all.floater.style.pixelTop += percent; if(NS) document.floater.top += percent; lastScrollY = lastScrollY + percent; } if(diffX != lastScrollX) { percent = .1 * (diffX - lastScrollX); if(percent > 0) percent = Math.ceil(percent); else percent = Mathfloor( percent); if(IE) document.all.floater.style.pixelLeft += percent; if(NS) document.floater.top += percent; lastScrollY = lastScrollY + percent; } } if(NS || IE) action window.setInterval("heartBeat()",1); //--> </SCRIPT> <DIV id=floater style="Z-INDEX: 1; LEFT: 807px; WIDTH: 145px; POSITION: absolute; TOP: 0px; HEIGHT: 350px"> <TABLE cellSpacing=0 cellPadding=0 width=145 border=0> <TBODY> <TR> <TD height=70> </TD></TR> <TR> <TD><IMG height=55 src="/img/200406301.jpg" width=145 border=0></TD> </TR> <TR> <TD height=65><IMG height=55 src="/img/200406302. jpg" width=145 border=0></TD> </TR></TR> <TR> <TD vAlign=top height=57><IMG height=52 src="/img/200406303.jpg" width= 145 border=0></TD> </TR> </TBODY></TABLE></DIV> <br/><br/><br/><br/><br/><br/>< br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/ ><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>< br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/ ><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>< br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/ ><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>< br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/ ><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>< br/><br/>