document.getElementById("TD的ID值").style.backgroundcolor="#fFF000"

解决方案 »

  1.   

    弱弱的问一下  怎么来设TD的ID值
      

  2.   

    你只要部分文字鼠标移上去变色吧
    <table border="1" style="width:100%">
    <tr>
    <td style="background-color:red">asd
    <span onmouseover="this.parentNode.style.backgroundColor='blue'" onmouseout="this.parentNode.style.backgroundColor='red'">指我</span>aasd
    </td>
    <td>asdasd
    </td>
    </tr>
    </table>
      

  3.   

    <td onmousemove='this.bgColor="black"'>