是 clickCls 
可能与浏览器有关吧,我的是ie5.5

解决方案 »

  1.   

    谢谢
    解决了
    不过还是有些问题
    <HTML>
    <HEAD><style>
    BODY {
    FONT-SIZE: 12px; FONT-FAMILY: 宋体; font-color: #000000
    }
    .clickCls{
       BACKGROUND-COLOR: black ;
       COLOR: white;
       BORDER-BOTTOM:  1PX SOLID blue;
       BORDER-RIGHT:  1PX SOLID blue;
       BORDER-LEFT:  1PX SOLID blue;
       BORDER-TOP:  1PX SOLID blue;
       
    }
    .highlightCls{
    BACKGROUND-COLOR: #EFE7DE ;
        COLOR: #737054;
        BORDER-BOTTOM:  1PX SOLID blue;
        BORDER-RIGHT:  1PX SOLID blue;
        BORDER-LEFT:  1PX SOLID blue;
        BORDER-TOP:  1PX SOLID blue;
       
    }
    .lowlightCls{
    BACKGROUND-COLOR:  ;
        COLOR: BLACK;
        BORDER: 0
    }</style>
    <script>function highlightie5(oObject){
    if (oObject.style.backgroundColor!="BLACK")
    {
    oObject.className='highlightCls';

    }
    window.status=event.srcElement.url;}function lowlightie5(oObject){
    //alert(event.srcElement.style.backgroundColor)
    if (event.srcElement.style.backgroundColor!="black")
    {
      oObject.className='lowlightCls';

    }
    }//点击链接后使其变色
    function ClickLink(oObject)
    {
       //先将所有其他的链接都恢复原有的状态
       var i=document.links.length;
       for (var j=0; j<i;j++)
        {
           document.links[j].style.backgroundColor="";
           document.links[j].style.color="black";
           document.links[j].style.border=0;
        }
       //alert(oObject.className);
       oObject.className='clickCls';
       alert(oObject.style.backgroundColor)//这里显示的结果为空
                                            //而clickCls设的是       
                                             //BACKGROUND-COLOR: black ;
       //alert(oObject.className);
       //alert(event.srcElement.tagName);
       //alert(oObject.className)
       //alert(oObject.style.border)
       //event.cancelBubble=true
       event.returnValue=false
    }
    </script>
    </HEAD>
    <BODY  ><A  href="" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this) target="_blank">上海</A><BR>
    <A  href="http://www.sina.com.cn" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this)>新浪</A><BR>
    <A  href="" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this) target="_blank">上海热线</A><BR>
    <A  href="http://www.sina.com.cn" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this)>新浪gfdfgerg</A><BR>
    <A  href="" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this) target="_blank">热线</A><BR><A  href="http://www.sina.com.cn" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this)>新浪gdsfdsfsfdsfsdfsdfs</A><BR><A  href="" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this) target="_blank">上海fdsfdsfdsfdsfd热线</A><BR><A  href="http://www.sina.com.cn" onmouseout=lowlightie5(this)
    onmouseover=highlightie5(this) onclick=ClickLink(this)>新浪dfdsfsdfsd</A><BR></BODY>
    </HTML>
      

  2.   

    问题出在这里
    function ClickLink(oObject)
    {
       //先将所有其他的链接都恢复原有的状态
       var i=document.links.length;
       for (var j=0; j<i;j++)
        {
           document.links[j].style.backgroundColor="";
           document.links[j].style.color="black";
           document.links[j].style.border=0;
        }   oObject.className='clickCls';
       alert(oObject.style.backgroundColor)//这里显示的结果为空
                                            //而clickCls设的是       
                                             //BACKGROUND-COLOR: black ;
      
       event.returnValue=false
    }