»
EnglishFrenchVietnamese

Print - TextScroller of Color - JavaScriptBank.com

Full version: jsB@nk » Text » Fade-Glow » TextScroller of Color
URL: https://www.javascriptbank.com/textscroller-of-color.html

TextScroller of Color © JavaScriptBank.comThis JavaScript types the containing messages with colour of character into view.

Full version: jsB@nk » Text » Fade-Glow » TextScroller of Color
URL: https://www.javascriptbank.com/textscroller-of-color.html



JavaScript
<script language="JavaScript">var someText = "JavaScriptBank.com - Bank of over 2000+ free JavaScripts";// the textvar aChar;var aSentence;var i=0;// a countervar colors = new Array("FF0000","FFFF66","FF3399","00FFFF","FF9900","00FF00"); // the colorsvar aColor;// the chosen colorfunction loadText(){// randomly choose coloraColor = colors[Math.floor(Math.random()*colors.length)];aChar = someText.charAt(i);if (i == 0)aSentence = aChar;elseaSentence += aChar;// 50 iterations max.if (i < 50)i++;// For IEif (document.all){textDiv.innerHTML= "<font color='#"+aColor+"' face='Tahoma' size='5'><i>"+aSentence+"</i></font>";setTimeout("loadText()",100);}// For Netscape Navigator 4else if (document.layers) {document.textDiv.document.write("<font color='#"+aColor+"' face='Tahoma' size='5'><i>"+aSentence+"</i></font>");document.textDiv.document.close();setTimeout("loadText()",100);}// For otherelse if (document.getElementById){document.getElementById("textDiv").innerHTML = "<font color='#"+aColor+"' face='Tahoma'size='5'><i>"+aSentence+"</i></font>";setTimeout("loadText()",100);}}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onload="loadText()"><div id="textDiv"><font color="#00ffff" face="Tahoma" size="5"><i>JavaScriptBank.com - Bank of over 2000+ free JavaScripts</i></font></div></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->