当鼠标移动到链接的字体上时改变字体颜色
怎样设置
<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",
"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();
</script>
<br>
<a href="index1">链接1</a>
<a href="index2">链接2</a>
<a href="index3">链接3</a>
<a href="index4">链接4</a></td>