206、所有链接不停变色

206、所有链接不停变色

脚本说明:

 

把如下代码加入<body>区域中

 

<script language="JavaScript">

 

<!-- Begin

 

function initArray() {

 

for (var i = 0; i < initArray.arguments.length; i++) {

 

this[i] = initArray.arguments[i];

 

}

 

this.length = initArray.arguments.length;

 

}

 

var colors = new initArray(

 

"red",

 

"blue",

 

"green",

 

"purple",

 

"black",

 

"tan",

 

"red");

 

delay = .5; // seconds

 

link = 0;

 

vlink = 0;

 

function linkDance() {

 

link = (link+1)%colors.length;

 

vlink = (vlink+1)%colors.length;

 

document.linkColor = colors[link];

 

document.vlinkColor = colors[vlink];

 

setTimeout("linkDance()",delay*1000);

 

}

 

linkDance();

 

// End -->

 

</script>

 

 

 

  <br>

 

       <a href="http://www.263.net">首都在线</a> <a href="http://www.7stk.com">网页特效代码</a>

 

                  <a href="http://www.163.net">163电子邮局</a> <a href="http://www.sina.com.cn">新浪网</a>

 

 

Write a comment

Comments: 1
  • #1

    csr04 (Tuesday, 01 September 2009 14:08)

    test