自动变颜色的连接文本

时间:2007-04-16 来源:互联网 编辑: 作者:不详 [ ]
  自动变颜色的连接文本
以下是代码片段:

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自动变颜色的连接文本</title>
</head>

<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>

<p><a target="_blank" href="http://linkweb.cn/js">网页特效</a></p>

</body>

</html>

 


访问() 相关评论() 打印资源 返回顶部 加入收藏

最新评论