大虾们,现在我想对一个htm页面的某个链接调用下面的js,对该链接做一个会变色的特效 js代码如下: <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","black","purple","blue","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> 上面是一段让链接变色的js代码
下面就是链接的html代码 <a href="http://www.163.com">m1</a> <a href="http://www.21cn.com">m2</a> 现在我只想把上面的js运用在<a href="http://www.163.com">m1</a>,请问该怎么写m1这个链接呢?