首页 > 代码库 > JavaScript文字交替变色闪烁代码

JavaScript文字交替变色闪烁代码

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>简单文字变色-亿诚</title></head><body><script language="javascript">var colors=new Array("red","orange","green","blue","browm","putple","gray","white");var ind=0;function changecolor(){    document.fgColor=colors[ind++];    if (ind==(colors.length)){ind=0}}setInterval("changecolor()",500);window.onload=changecolor;</script><h1 align="center">QQ空间站欢迎您www.js323.com</h1></body></html>

 

JavaScript文字交替变色闪烁代码