script teks neon 3 warna
Untuk lebih jelasnya seperti contoh di bawah ini.
Berikut ini scriptnya:
<h2><script language="JavaScript1.2">var message="Thank you for visiting Ash's Tutorial Blog!"var neonbasecolor="red"var neontextcolor="yellow"var neontextcolor2="green"var flashspeed=100 // speed of flashing in millisecondsvar flashingletters=3 // number of letters flashing in neontextcolorvar flashingletters2=1 // number of letters flashing in neontextcolor2 (0 to disable)var flashpause=0 // the pause between flash-cycles in milliseconds///No need to edit below this line/////var n=0if (document.all||document.getElementById){document.write('<font color="'+neonbasecolor+'">')for (m=0;m<message.length;m++)document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')document.write('</font>')}elsedocument.write(message)function crossref(number){var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)return crossobj}function neon(){//Change all letters to base colorif (n==0){for (m=0;m<message.length;m++)crossref(m).style.color=neonbasecolor}//cycle through and change individual letters to neon colorcrossref(n).style.color=neontextcolorif (n>flashingletters-1) crossref(n-flashingletters).style.color=neontextcolor2if (n>(flashingletters+flashingletters2)-1) crossref(n-flashingletters-flashingletters2).style.color=neonbasecolorif (n<message.length-1)n++else{n=0clearInterval(flashing)setTimeout("beginneon()",flashpause)return}}function beginneon(){if (document.all||document.getElementById)flashing=setInterval("neon()",flashspeed)}beginneon()</script></h2>