Chinaunix首页 | 论坛 | 博客
  • 博客访问: 79104
  • 博文数量: 73
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 740
  • 用 户 组: 普通用户
  • 注册时间: 2014-07-04 16:50
文章分类
文章存档

2014年(73)

我的朋友

分类: JavaScript

2014-07-04 17:08:44


点击(此处)折叠或打开

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  6. <title>简单文字变色</title>
  7. </head>
  8. <body>
  9. <script language="javascript">
  10. var colors=new Array("red","orange","green","blue","browm","putple","gray","white");
  11. var ind=0;
  12. function changecolor()
  13. {
  14.     document.fgColor=colors[ind++];
  15.     if (ind==(colors.length)){ind=0}
  16. }
  17. setInterval("changecolor()",500);
  18. window.onload=changecolor;
  19. </script>
  20. <h1 align="center"></h1>
  21. </body>
  22. </html>

阅读(352) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~