»
EnglishFrenchVietnamese

Print - Colorfull Dynamic Text Creator - JavaScriptBank.com

Full version: jsB@nk » Text » Fade-Glow » Colorfull Dynamic Text Creator
URL: https://www.javascriptbank.com/colorfull-dynamic-text-creator.html

Colorfull Dynamic Text Creator © JavaScriptBank.comThis JavaScript will open a new window contain the text you typed with the colorfull characters.

Full version: jsB@nk » Text » Fade-Glow » Colorfull Dynamic Text Creator
URL: https://www.javascriptbank.com/colorfull-dynamic-text-creator.html



JavaScript
<script language="JavaScript">myColor = new Array (1) ;myColor[0] = "#FF0000" ;myColor[1] = "#CC0099" ;myColor[2] = "#990099" ;myColor[3] = "#CC00FF" ;myColor[4] = "#330099" ;myColor[5] = "#006699" ;myColor[6] = "#33FF99" ;myColor[7] = "#336600" ;myColor[8] = "#666000" ;myColor[9] = "#996600" ;myColor[10] = "#FF9900" ;myColor[11] = "#FFCC33" ;myColor[12] = "#FFFF00" ;myColor[13] = "#FF9966" ;var b = 0 ; function morefun () {   var backColor = document.myform.myselect[document.myform.myselect.selectedIndex].value ;   mywin = newwin = window.open("", "mywin","toolbar=no,directories=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=no,location=no,,");   mystring = document.myform.myarea.value ;if (document.myform.isHTML.status==false) {   mywin.document.writeln("<HTML><HEAD>") ;   mywin.document.writeln("<TITLE>Somewhere over the rainbow....</TITLE></HEAD>") ;   mywin.document.writeln('<BODY BGCOLOR="' + backColor + '">');   }var i = 0 ;  while (i != mystring.length) {   a = mystring.substring(i, i+1) ;   if (a=="<") {     z = i ;      while (a != ">") {        z ++        a = mystring.substring(z, z+1) ;        }     a = mystring.substring(i, z+1) ;      mywin.document.writeln(a) ;     i = z + 1;    }  else if (a == " "|| a == "" || a == "  ") {    mywin.document.write(a) ;    i++ ;          }  else {      if (b>13) {      b = 0 ;      }   c = myColor[b] ;   mywin.document.write(a.fontcolor(c)) ;   b++ ;   i++ ;  }}if (document.myform.isHTML.status==false) { mywin.document.writeln('</body>') ; mywin.document.writeln('</html>') ; }mywin.document.close() ;}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="myform">HTML Source <input type="checkbox" name="isHTML" value="ON"><select name="myselect"><option value="black">Black Background</option><option value="white">White Background</option></select><br><textarea name="myarea" rows="10" cols="30"></textarea><br><input type="button" value="OK" onclick="morefun()"><input type="reset" name="B2" value="Clear"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->