<table>
  <tr> 
    <td onmouseover=this.style.backgroundColor='#FFFFCC' onmouseoutthis.style.backgroundColor='#DDDDDD'><a href="#">TDTDTD</A></td>
    <td onmouseover=this.style.backgroundColor='#CCCCCC' onmouseout=this.style.backgroundColor='#EEEEEE'><a href="#">tdtdtd</A></td>
  </tr>
</table>

解决方案 »

  1.   

    <table>
      <tr> 
        <td onmouseover=this.style.backgroundColor='#FFFFCC' onmouseout=this.style.backgroundColor='#DDDDDD'><a href="#">TDTDTD</A></td>
        <td onmouseover=this.style.backgroundColor='#CCCCCC' onmouseout=this.style.backgroundColor='#EEEEEE'><a href="#">tdtdtd</A></td>
      </tr>
    </table>在 onmouseover和onmouseout后加 this.style.backgroundColor='#EEEEEE' (backgroundColor后是颜色值)
      

  2.   

    backgroundColor是改变TD的底色,我要的是改变表格中字的颜色。就是改变“TDTDTD”的颜色。
      

  3.   

    呵呵,好象是不是可以用CSS就可以控制了啊?
      

  4.   

    要改文字的颜色就用CSS吧。 你帖出来的代码本来就是改TD的底色的。
      

  5.   

    我想应该用innerhtml这个东西改变td里面的代码,加上<font>的标签.建议写javascript函数.将td的id传进去,然后改变td 的innerhtml.具体的请楼主找一下帮助吧
    我不做asp已经好久了.
      

  6.   

    <td onmouseover="this.style.color='#ff0000';" onmouseout="this.style.color='#000000';">
      

  7.   

    <script>
    function tdMOver(obj)
    {
    obj.style.color = "red";
    }
    function tdMOut(obj)
    {
    obj.style.color = "blue";
    }
    </script>
    <table>
      <tr> 
        <td onmouseover="tdMOver(this)" onmouseout="tdMOut(this)" style="cursor:hand">TDTDTD</td>
        <td onmouseover="tdMOver(this)" onmouseout="tdMOut(this)" style="cursor:hand">tdtdtd</td>
      </tr>
    </table>
      

  8.   

    <table>
      <tr> 
        <td id='test' onmouseover=this.style.backgroundColor='#FFFFCC' onmouseoutthis.style.backgroundColor='#DDDDDD'><a href="#">TDTDTD</A></td>
        <td onmouseover="this.innerHTML='<a href=\'#\'><font color=red>tdtdtd</font></A>'" onmouseout="this.innerHTML='<a href=\'#\'><font color=blue>tdtdtd</font></A>'"><a href="#">tdtdtd</A></td>
      </tr>
    </table>
      

  9.   

    <script language="JavaScript">
    function tdMOver(thisObj){
    thisObj.style.color="#ff0000";
    }
    function tdMOut(thisObj){
    thisObj.style.color="#000000";
    }
    </script>
    <table>
      <tr> 
        <td><a href="#" onmouseover="tdMOver(this)"  onmouseout="tdMOut(this)">TDTDTD</A></td>
        <td><a href="#" onmouseover="this.style.color='#ff0000';" onmouseout="this.style.color='#000000';">tdtdtd</A></td>
      </tr>
    </table>你改变的是<a>的颜色!如要改变<td>同理!
    你可以利用样式改变<a>的颜色(A:link A:visited A:hover A:active等属性)
      

  10.   

    用一个函数就可以了
    <td onmouseover="tdMOver(this)" ...var curTd=null;
    function tdMOver(Obj){
      if(curTd) Obj.bgColor="#XXXXXX";//自己定义颜色
      Obj.bgColor="#FFFFFF";
      curTd=Obj;
    }
      

  11.   

    建议写两个CSS,通过鼠标的时间切换CSS
    即便是多个页面调用同一个CSS,同一个function就可以了
      

  12.   

    obj.style.color = "FFFFFF"我用过,但没有反应呀!
      

  13.   

    做CSS不太懂啊,能帮一下吗?