»
Tiếng AnhTiếng PhápTiếng Việt

In - Ảnh cuộn dọc - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Scrollers » Theo chiều đứng » Ảnh cuộn dọc
URL: http://www.javascriptbank.com/vertical-slide-show-from-top-down.html

Ảnh cuộn dọc © JavaScriptBank.comMột đoạn mã JavaScript khác để làm cho ảnh di chuyển theo chiều từ trên xuống trong khung. Người dùng có thể thay đổi tốc độ cuộn.

Phiên bản đầy đủ: jsB@nk » Scrollers » Theo chiều đứng » Ảnh cuộn dọc
URL: http://www.javascriptbank.com/vertical-slide-show-from-top-down.html



JavaScript
<SCRIPT language=JavaScript>if(top.location != self.location)top.location.replace(self.location);</SCRIPT><SCRIPT language=javascript>//If using any portion of this DEMO script,//one must insert along this notice too:/********************************          http://vbarsan.com/*   This notice may not be removed ********************************/var swidth=240;var sheight=50;var sspeed=1;var resspeed=sspeed;var restart=sspeed;var rspeed=sspeed;var imagef='';preload1 = new Image();preload1.src = "../image/gif_logojsb2.gif";preload2 = new Image();preload2.src = "../image/gif_logojsb.gif";preload3 = new Image();preload3.src = "../image/gif_logojsb2.gif";var leftimage=new Array();leftimage[0]='<a href="http://javascriptbank.com"><img src='+preload1.src+' width=236 height=47 alt="JavaScript Bank"></a>';leftimage[1]='<a href="http://javascriptbank.com"><img src='+preload2.src+' width=236 height=47 alt="JavaScript Bank"></a>';leftimage[2]='<a href="http://javascriptbank.com"><img src='+preload3.src+' width=236 height=47 alt="JavaScript Bank"></a>';for(mi=leftimage.length-1;mi>=0;mi--)imagef=imagef+leftimage[mi]+'<br>';function goup(){if(sspeed!=rspeed*8){sspeed=sspeed*2;restart=sspeed;}}function start(){if(document.getElementById){tdiv6=document.getElementById('slider');tdiv6.innerHTML=imagef;thel=tdiv6.offsetHeight;tdiv6.style.top=-thel;slidens6();}else if(document.all){tdivie=slider;tdivie.innerHTML=imagef;thel=tdivie.offsetHeight;tdivie.style.pixelTop=-thel;slideie();}else if(document.layers){tdivns4=document.slider1.document.slider2;tdivns4.document.write(imagef);tdivns4.document.close();thel=tdivns4.document.height;tdivns4.top=-thel;slidens4();}}function slidens4(){if(tdivns4.top<=sheight){tdivns4.top+=sspeed;setTimeout("slidens4()",100);}else{tdivns4.top=-thel;slidens4();}}function slideie(){if(tdivie.style.pixelTop<=sheight){tdivie.style.pixelTop+=sspeed;setTimeout("slideie()",100);}else{tdivie.style.pixelTop=-thel;slideie();}}function slidens6(){if(parseInt(tdiv6.style.top)<=sheight){tdiv6.style.top=parseInt(tdiv6.style.top)+sspeed;setTimeout("slidens6()",100);}else{tdiv6.style.top=-thel;slidens6();}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=start();><DIV class=tab><A class=tab href="http://vbarsan.com/" target=_self>|<U> DHTML Cross-Browser JavaScripts |</U><BR>Vertical Scrollers,Horizontal Scrollers and Tickers</A></DIV><BR><SCRIPT language=javascript>document.write('<table border=1 align="center" bgcolor="#ccffcc"><tr><td bgcolor="#ffffcc"><div class=tabc><b><a class=tab href="#" onMouseOver="goup();">Speed<br>UP</a></b></div></td><td width='+sheight+'>');if(document.layers)document.write('<span style="borderWidth:0.1px; borderStyle:none; clip:rect(0 '+swidth+' '+sheight+' 0);"><ilayer width='+swidth+' height='+sheight+' name="slider1"><layer class=tabt width='+swidth+' height='+sheight+'>SLIDING SHOW</layer><layer width='+swidth+' height='+sheight+' name="slider2" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></layer></ilayer></span>');else {document.write('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);"><div class=tabt style="position:absolute;width:'+swidth+';height:'+sheight+';">SLIDING SHOW</div><div id="slider" style="position:relative;width:'+swidth+';" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></div></div>');}</SCRIPT></TD></TR></TABLE></fieldset></center><SCRIPT language=JavaScript>function ctrlA0(corp) {with(corp){focus(); select()}if(document.all){txt=corp.createTextRange()txt.execCommand("Copy")window.status='Text copied to clipboard'}else window.status='Press ctrl-c to copy the text to the clipboard'setTimeout("window.status=''",5000)}</SCRIPT></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->