Full version: jsB@nk » Text » Fade-Glow » Changing Text Colours script
URL: https://www.javascriptbank.com/changing-text-colours-script.html
This JavaScript code makes colours of string change continously.
Full version: jsB@nk » Text » Fade-Glow » Changing Text Colours script
URL: https://www.javascriptbank.com/changing-text-colours-script.html
<SCRIPT language=JavaScript1.2 type=text/javascript><!-- Beginfunction initArray() {this.length = initArray.arguments.length;for (var i = 0; i < this.length; i++) {this[i] = initArray.arguments[i]; }}// Set the text to be displayed here.var ctext = "Wow! Look at all the pretty colours! ;-)";// Set the speed of change here (in milliseconds)var speed = 1000;var x = 0;var color = new initArray(// Set the colours to be used here"red", "purple","blue", "green","black","orange");if(navigator.appName == "Netscape") {document.write('<layer id="c"><center>'+ctext+'</center></layer><br>');}if (navigator.appVersion.indexOf("MSIE") != -1){document.write('<div id="c"><center>'+ctext+'</center></div>');}function chcolor(){ if(navigator.appName == "Netscape") {document.c.document.write('<center><font color="'+color[x]);document.c.document.write('">'+ctext+'</font></center>');document.c.document.close();}else if (navigator.appVersion.indexOf("MSIE") != -1){document.all.c.style.color = color[x];}(x < color.length-1) ? x++ : x = 0;}setInterval("chcolor()",1000);// End --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->