Home > Article > Web Front-end > Create neon text code and special effects based on JavaScript_javascript skills
Example 1:
The screenshot of the running effect is as follows:
The specific code is as follows:
http-equiv="Content-Type" content="text/html; charset=gb2312">
Neon Light
var Tname="欢迎您的到来!"; var Tlen=Tname.length; document.write(""+Tname+""); var col=new Array("#FFCC00","#3333FF","#FFCC00","#FF0000","#FFCC00","#CC33FF"); var ic=0; function Dcolor(){ var Strname=""; for (i=0;iTlen;++i){ var Strname=Strname+"+col[ic]+">"+Tname.substring(i,i+1)+""; ic=ic+1; if (ic==col.length) ic=0; } a.innerHTML=Strname; setTimeout("Dcolor()",200); } Dcolor(); class="style5">
Example 2:
The rendering is as follows: