提示:您可以先修改部分代碼再運行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>逐漸層色的文本</title><meta http-equiv="content-type" content="text/html;charset=gb2312"></head><body><!--把下面代碼加到<body>與</body>之間--><script language="javascript">var message="歡迎訪問中國WEB第一站,這裡是您的建站樂園,請記住本站網址:http://www.111cn.net!" var n=0; if (document.all){ document.write('<font size="12px" color="red">') for (m=0;m<message.length;m++) document.write('<span id="neonlight" >'+message.charAt(m)+'</span>') document.write('</font>') 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="#000000" } tempref[n].style.color="RED" if (n<tempref.length-1) n++ else{ n=0 clearInterval(flashing) setTimeout("beginneon()",1000) return } } function beginneon(){ if (document.all) flashing=setInterval("neon()",50) } beginneon() </script></body></html>
提示:您可以先修改部分代碼再運行