document.getElementById("yourTable").style.backgroundColor="red";

解决方案 »

  1.   

    document.all.tableid.style.bgcolor="#ffffff";
    这样就好了
      

  2.   

    onmouseover="this.style.background='BDDFFF' "
      

  3.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>新建网页 1</title>
    </head>
    <body >
    <table width="100%" >
      <tr>
        <td id="kkk">1111111111111</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
     
    <script language="javascript">
    document.all.kkk.style.background="#000000";</script>
    </body></html>