<html> <head> <title>一直不停自动变换颜色的文字链接</title> <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", "yellow", "lime", "coral", "palegreen", "silver", "gold", "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> </head> <body> <li><a href="http://www.sjzkeda.com/">电表控制器</a></li> <li><a href="http://www.sjzpcmm.com/">石家庄苗木</a></li> <li><a href="http://www.chenxuzl.com/">石家庄花卉</a></li> <li><a href="http://www.caopingzhixiao.com//">草坪基地</a></li> </body> </html>
时间: 2024-10-03 06:07:03