要完成此效果把如下代码加入到<body>区域中
<h2><script language="JavaScript1.2">
//下面设置显示效果的属性var message="Welcome to JavaScript Fairyland!"var neonbasecolor="gray"var neontextcolor="33ff33"var flashspeed=100 //in milliseconds
///No need to edit below this line/////
var n=0if (document.all){document.write('<font color="'+neonbasecolor+'">')for (m=0;m<message.length;m++)document.write('<span id="neonlight">'+message.charAt(m)+'</span>')document.write('</font>')
//cache reference to neonlight arrayvar tempref=document.all.neonlight}elsedocument.write(message)
function neon(){
//Change all letters to base colorif (n==0){for (m=0;m<message.length;m++)tempref[m].style.color=neonbasecolor}
//cycle through and change individual letters to neon colortempref[n].style.color=neontextcolor
if (n<tempref.length-1)n++else{n=0clearInterval(flashing)setTimeout("beginneon()",1500)return}}
function beginneon(){if (document.all)flashing=setInterval("neon()",flashspeed)}beginneon()
</script></h2>