<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
A:link { color:#FF0000 }
A:hover { color:blue; text-transform:uppercase; }
A:visited { color:blue }
</style>
</HEAD><BODY>
<script language="JavaScript" charset="gb2312" type="text/javascript" src="http://www8.itsun.com/count.php?uuid=1651134&style=text"></script></BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
A:link { color:#FF0000 }
A:hover { color:blue; text-transform:uppercase; }
A:visited { color:blue }
</style>
</HEAD><BODY>
<script language="JavaScript" charset="gb2312" type="text/javascript" src="http://www8.itsun.com/count.php?uuid=1651134&style=text"></script></BODY>
</HTML>
<style>
a {color:expression(this.href=='http://emar.itsun.com/stats/index.jsp?uuid=1651134'?'#f00':'#0f0');}
</style>
<script language="JavaScript" charset="gb2312" type="text/javascript" src="http://www8.itsun.com/count.php?uuid=1651134&style=text"></script>
<br>
<a href="#">#</a>
<script>
alinks=document.getElementsByTagName("a");
var ahref="";
var arr1;
for (var i=alinks.length-1;i>-1;i--){
ahref=alinks[i].href;
if (ahref.split("itsun.com").length>1){
alinks[i].style.color="red";
alinks[i].href="abc.asp";
}
}
</script>
加到最后面
alinks=document.getElementsByTagName("a");
var ahref="";
for (var i=alinks.length-1;i>-1;i--){
ahref=alinks[i].href;
if (ahref.split("itsun.com").length>1){
alinks[i].style.color="red";
break;
}
}
</script>提高点效率我想你的计数器应该是放在最后的吧?
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
A:link { color:#FF0000 }
A:hover { color:blue; text-transform:uppercase; }
A:visited { color:red }
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
function setClassName(){
var allHref=document.getElementsByTagName("A");
for(var i=0;i<allHref.length;i++){
if(allHref[i].innerText=="[ITSUN统计]"){
allHref[i].attachEvent("onmouseover",function(){event.srcElement.style.color='blue';});
allHref[i].attachEvent('onmouseout',function(){event.srcElement.style.color='red';});
}
}
}
//-->
</SCRIPT>
</HEAD><BODY onload="setClassName()">
<script language="JavaScript" charset="gb2312" type="text/javascript" src="http://www8.itsun.com/count.php?uuid=1651134&style=text"></script>
<a href="">fdafdaf</a>
</BODY>
</HTML>