自动变颜色的链接文本——网页特效代码如下:<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>网页特效|Linkweb.cn/Js|---自动变颜色的连接文本</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:///js">网页特效</a></p>
</body>
</html>
|
|