<div class="htmlarea"> <textarea id="runcode93386"> <title>JavaScript仿歌词效果</title> <h2> </h2> </textarea> <br><input onclick="runEx('runcode93386')" type="button" value="运行代码"><input onclick="doCopy('runcode93386')" type="button" value="复制代码"> <input onclick="doSave(runcode93386)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 全选 注:</a>如需引入外部Js需刷新才能执行</div>]<script language="JavaScript"> var message="Welcome to JavaScript Fairyland!" var neonbasecolor="gray" var neontextcolor="33ff33" var flashspeed=100 var n=0 if (document.all){ document.write('<font color="'+neonbasecolor+'">') for (m=0;m<message.length;m++) document.write('<span id="neonlight">'+message.charAt(m)+'') document.write('') var tempref=document.all.neonlight } else document.write(message) function neon(){ if (n==0){ for (m=0;m<message.length;m++) tempref[m].style.color=neonbasecolor } tempref[n].style.color=neontextcolor if (n<tempref.length-1) n++ else{ n=0 clearInterval(flashing) setTimeout("beginneon()",1500) return } } function beginneon(){ if (document.all) flashing=setInterval("neon()",flashspeed) } beginneon() </script>