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

In - Trang web tự động trượt - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Trình duyệt » Cửa sổ » Trang web tự động trượt
URL: https://www.javascriptbank.com/automatic-page-frame-scroller.html

Trang web tự động trượt © JavaScriptBank.comHiệu ứng làm cho nội dung của trang web tự động di chuyển lên trên khi ta rê con trỏ chuột vào thanh trượt của trang web. Tuy nhiên, trong ví dụ, tốc độ trượt khá chậm.

Phiên bản đầy đủ: jsB@nk » Trình duyệt » Cửa sổ » Trang web tự động trượt
URL: https://www.javascriptbank.com/automatic-page-frame-scroller.html



CSS
<STYLE type=text/css>A:link {COLOR: blue}A:visited {COLOR: blue}A:hover {COLOR: red}.tab {FONT-FAMILY: Arial; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-ALIGN: center}.tabc {COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-ALIGN: center}.tabb {COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 14px; FONT-WEIGHT: bold; TEXT-ALIGN: center}.taj {COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 12px; TEXT-ALIGN: justify}.tabt {COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 18px; FONT-WEIGHT: bold}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript>//If you have any other NS4 document-layer related //lines within your page/frame script, make sure to set  //them as children: document.ns4page1.document.yourchild//Also when using NS4 please pay attention to style controls.//Parameters follow://==================//speed: set to your own;(higher => faster)var pspeed=1 //pause before scrolling up: set to your own;var upause=3000 //pause before scrolling down: set to your own;var dpause=2500 //Algorithm follow://=================var resumepspeed=pspeedfunction startpage(){if (document.all){sizeup=iens6page.offsetHeight-document.body.clientHeightiepage(iens6page)}else if (document.getElementById){sizeup=document.getElementById("iens6page").offsetHeight-window.innerHeightns6page(document.getElementById('iens6page'))}else if(document.layers){document.ns4page1.visibility="show"sizeup=document.height-window.innerHeightns4page(document.ns4page1)}}function iepage(whichdiv){iedivp=eval(whichdiv)iedivp.style.pixelTop=0if (sizeup<=0) return;else{ setTimeout("iepslide()",upause)}}function iepslide(){if(iedivp.style.pixelTop>=sizeup*-1){iedivp.style.pixelTop-=pspeedsetTimeout("iepslide()",50)}else setTimeout("iepslide1()",dpause);}function iepslide1(){if(iedivp.style.pixelTop<0){iedivp.style.pixelTop+=pspeed;setTimeout("iepslide1()",50)}else iepage(iedivp);}function ns4page(whichlayer){ns4layerp=eval(whichlayer)ns4layerp.top=0if (sizeup<=0) return;else{ setTimeout("ns4pslide()",upause)}}function ns4pslide(){if (ns4layerp.top>=sizeup*(-1)){ns4layerp.top-=pspeedsetTimeout("ns4pslide()",50)}else setTimeout("ns4pslide1()",dpause);}function ns4pslide1(){if (ns4layerp.top<0){ns4layerp.top+=pspeedsetTimeout("ns4pslide1()",50)}else ns4page(ns4layerp);}function ns6page(whichdiv){ns6divp=eval(whichdiv)ns6divp.style.top=0if (sizeup<=0) return;else{ setTimeout("ns6pslide()",upause)}}function ns6pslide(){if (parseInt(ns6divp.style.top)>=sizeup*(-1)){ns6divp.style.top=parseInt(ns6divp.style.top)-pspeedsetTimeout("ns6pslide()",50)}else setTimeout("ns6pslide1()",dpause);}function ns6pslide1(){if (parseInt(ns6divp.style.top)<0){ns6divp.style.top=parseInt(ns6divp.style.top)+pspeedsetTimeout("ns6pslide1()",50)}else ns6page(ns6divp);}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=startpage();><SCRIPT language=JavaScript>if (document.layers)document.write('<table border=0><tr><td>')if (document.getElementById||document.all)document.write('<div  id="iens6page" style="position:relative;top:0;left:0;overflow:hidden;" onMouseover="pspeed=0;" onMouseout="pspeed=resumepspeed">')</SCRIPT></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->