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

In - Chữ chạy từ 4 hướng - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Scrollers » Theo chiều ngang » Chữ chạy từ 4 hướng
URL: http://www.javascriptbank.com/horizontal-slider-v20.html

Chữ chạy từ 4 hướng © JavaScriptBank.comHiệu ứng tạo cho tin tức cập nhật trong khung di chuyển">di chuyển từ bốn hướng khác nhau.

Phiên bản đầy đủ: jsB@nk » Scrollers » Theo chiều ngang » Chữ chạy từ 4 hướng
URL: http://www.javascriptbank.com/horizontal-slider-v20.html



CSS
<STYLE type=text/css>A.tab:link {COLOR: blue}A.tab:visited {COLOR: blue}A.tab:hover {COLOR: red}.tab {FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial}.tabb {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: navy; FONT-FAMILY: Arial}.tabc {FONT-WEIGHT: bold; FONT-SIZE: 12px; /*COLOR: white; */FONT-FAMILY: Arial}.tabt {FONT-WEIGHT: bold; FONT-SIZE: 18px; COLOR: red; FONT-FAMILY: Arial}</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>var wen=740;if(screen.availWidth<=740){wen=screen.availWidth-10;} LeftP = (screen.availWidth-wen)/2;window.moveTo(LeftP,0);var he=800;var hn=640;if(screen.availHeight<=800){he=screen.availHeight;hn=screen.availHeight-160;}if(document.all || document.getElementById)window.resizeTo(wen,he);if(document.layers){origWidth = innerWidth;origHeight = innerHeight;innerWidth=wen;innerHeight=hn;reDo();}function reDo(){if(innerWidth != origWidth || innerHeight != origHeight)location.reload();}</SCRIPT><SCRIPT language=javascript>var sawidth=400;var saheight=80;var saspeed=10;var singleatext='<div align="center" class=tabc><a target=new class=tab href="http://JavaScriptBank.com/"><u><em> <u>Common features:</u></div><div align="center" class=tabc>- Any number of internal / external HTML formatted Messages.</div><div align="center" class=tabc>- Pause for every Message and also while Mouse is placed over.</div><div align="center" class=tabc>- Adjustable: Pause, Size, Speed and Background (color or image).</div><div align="center" class=tabc>- WINDOWS: NS4+, NS6+, IE4+, MOZILLA, OPERA 7+</DIV>';var singlemessage='<div class=tab align="center"><a target=new class=tab href="http://JavaScriptBank.com/"><u>Multiple Message Vertical SCROLLER v5.0 + <div class=tab>Multiple Message Belt CONVEYER V5.0 + <div class=tab>Multiple Message TICKER v3.0 +<div class=tab>Multiple Message TWINKLER v3.0</u></a></div></div></div></div>';function astart(){if(document.layers){ns4alayer=document.ns4aslider.document.ns4aslider1;ns4alayer.top=saheight;ns4alayer.visibility='show';ns4amarquee();}else if(document.all){ieadiv=ieNS6aslider;ieadiv.style.top=saheight;ieamarquee();}else if(document.getElementById&&!document.all){ns6adiv=document.getElementById('ieNS6aslider');ns6adiv.style.top=saheight;ns6amarquee();}}function ieamarquee0(){if(ieadiv.style.pixelLeft>0&&ieadiv.style.pixelLeft<=4*saspeed){ieadiv.style.pixelLeft=-sawidth;setTimeout("ieamarquee00()",100);return;}if(ieadiv.style.pixelLeft>=sawidth*-1){ieadiv.style.pixelLeft-=4*saspeed;setTimeout("ieamarquee0()",100);}}function ns4amarquee(){if(ns4alayer.top>0&&ns4alayer.top<=saspeed){ns4alayer.top=-saheight;setTimeout("ns4amarquee1()",100);return;}if(ns4alayer.top>=saheight*-1){ns4alayer.top-=saspeed;setTimeout("ns4amarquee()",100);}}function ns4amarquee1(){if(ns4alayer.top>=0){ns4alayer.left=sawidth;ns4alayer.visibility='show';setTimeout("ns4amarquee0()",100);return;}if(ns4alayer.top<=0){ns4alayer.top+=saspeed;setTimeout("ns4amarquee1()",100);}}function ns4amarquee0(){if(ns4alayer.left>0&&ns4alayer.left<=4*saspeed){ns4alayer.left=-sawidth;setTimeout("ns4amarquee00()",100);return;}if(ns4alayer.left>=sawidth*-1){ns4alayer.left-=4*saspeed;setTimeout("ns4amarquee0()",100);}}function ns4amarquee00(){if(ns4alayer.left>=0){ns4alayer.left=0;return;}if(ns4alayer.left<=0){ns4alayer.left+=4*saspeed;setTimeout("ns4amarquee00()",100);}}function ns6amarquee0(){if(parseInt(ns6adiv.style.left)>0&&parseInt(ns6adiv.style.left)<=4*saspeed){ns6adiv.style.left=-sawidth;setTimeout("ns6amarquee00()",100);return;}if(parseInt(ns6adiv.style.left)>=sawidth*-1){ns6adiv.style.left=parseInt(ns6adiv.style.left)-4*saspeed;setTimeout("ns6amarquee0()",100);}}function ieamarquee00(){if(ieadiv.style.pixelLeft>=0){ieadiv.style.pixelLeft=0;return;}if(ieadiv.style.pixelLeft<=0){ieadiv.style.pixelLeft+=4*saspeed;setTimeout("ieamarquee00()",100);}}function ns6amarquee00(){if(parseInt(ns6adiv.style.left)>=0){ns6adiv.style.left=0;return;}if(parseInt(ns6adiv.style.left)<=0){ns6adiv.style.left=parseInt(ns6adiv.style.left)+4*saspeed;setTimeout("ns6amarquee00()",100);}}function ieamarquee(){if(ieadiv.style.pixelTop>0&&ieadiv.style.pixelTop<=saspeed){ieadiv.style.pixelTop=-saheight;setTimeout("ieamarquee1()",100);return;}if(ieadiv.style.pixelTop>=saheight*-1){ieadiv.style.pixelTop-=saspeed;setTimeout("ieamarquee()",100);}}function ns6amarquee(){if(parseInt(ns6adiv.style.top)>0&&parseInt(ns6adiv.style.top)<=saspeed){ns6adiv.style.top=-saheight;setTimeout("ns6amarquee1()",100);return;}if(parseInt(ns6adiv.style.top)>=saheight*-1){ns6adiv.style.top=parseInt(ns6adiv.style.top)-saspeed;setTimeout("ns6amarquee()",100);}}function ieamarquee1(){if(ieadiv.style.pixelTop>=0){ieadiv.style.left=sawidth;setTimeout("ieamarquee0()",100);return;}if(ieadiv.style.pixelTop<=0){ieadiv.style.pixelTop+=saspeed;setTimeout("ieamarquee1()",100);}}function ns6amarquee1(){if(parseInt(ns6adiv.style.top)>=0){ns6adiv.style.left=sawidth;setTimeout("ns6amarquee0()",100);return;}if(parseInt(ns6adiv.style.top)<=0){ns6adiv.style.top=parseInt(ns6adiv.style.top)+saspeed;setTimeout("ns6amarquee1()",100);}}var swidth=312;var sheight=49;var sspeed=5;var resspeed=sspeed;var imagef='';preload1 = new Image();preload1.src = "../image/logojs.gif";preload2 = new Image();preload2.src = "../image/logojs.gif";preload3 = new Image();preload3.src = "../image/logojs.gif";var leftimage=new Array();leftimage[0]='<img src='+preload1.src+' width=310 height=47 alt="http://JavaScriptBank.com/" border=1>';leftimage[1]='<img src='+preload2.src+' width=310 height=47 alt="JSBank" border=1>';leftimage[2]='<img src='+preload3.src+' width=310 height=47 alt="JSBank" border=1>';for(mi=0;mi<leftimage.length;mi++) imagef=imagef+leftimage[mi];function start(){if(document.all)firstie(slider);else if(document.getElementById)first6(document.getElementById('slider'));else if(document.layers)firstslide();}function firstslide(){document.slider1.document.slider2.document.write('<nobr>'+imagef+'</nobr>');document.slider1.document.slider2.document.close();thel=document.slider1.document.slider2.document.width;document.slider1.document.slider2.left-=thel;sslide();}function sslide(){if(document.slider1.document.slider2.left>=thel*(-1)){document.slider1.document.slider2.left-=sspeed;setTimeout("sslide()",100);}else{document.slider1.document.slider2.left=swidth;sslide();}}function firstie(whichdiv){tdivie=eval(whichdiv);tdivie.innerHTML=('<nobr>'+imagef+'</nobr>');tdivie.style.pixelLeft=swidth;thel=swidth*leftimage.length;scrollie();}function scrollie(){if(tdivie.style.pixelLeft>=thel*(-1)){tdivie.style.pixelLeft-=sspeed;setTimeout("scrollie()",100);}else{tdivie.style.pixelLeft=swidth;scrollie();}}function first6(whichdiv){tdiv6=eval(whichdiv);tdiv6.innerHTML=('<nobr>'+imagef+'</nobr>');tdiv6.style.left=swidth;thel=swidth*leftimage.length;scroll6();}function scroll6(){if(parseInt(tdiv6.style.left)>=thel*(-1)){tdiv6.style.left=parseInt(tdiv6.style.left)-sspeed;setTimeout("scroll6()",100);}else{tdiv6.style.left=swidth;scroll6();}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=astart();start();><SCRIPT language=JavaScript>document.write('<center><span style="borderWidth:0.1px;borderColor:#cc99ff;width:'+sawidth+';height:'+saheight+';">');if(document.layers)document.write('<ilayer id="ns4aslider" bgcolor="#cc99ff" width='+sawidth+' height='+saheight+'><layer id="ns4aslider1" width='+sawidth+' height='+saheight+'>'+singleatext+'</layer></ilayer>');if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+sawidth+';height:'+saheight+';clip:rect(0 '+sawidth+' '+saheight+' 0);background-color:#cc99ff;border:1px solid #cc99ff;"><div id="ieNS6aslider" style="position:relative;width:'+sawidth+';height:'+saheight+';">'+singleatext+'</div></div>');}</SCRIPT><!-- 10/20/03 --><DIV class=tabc align=center>Adjust: Speed and Size. Pauses with mouse over.</DIV><SCRIPT language=javascript>document.write('<table border=1 bgcolor="white" align="center"><tr><td width='+swidth+' height='+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 width='+swidth+' 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 id="slider" style="position:relative;width:'+swidth+';" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></div></div>');</SCRIPT></TD></TR></TABLE><BR><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-->