本帖最后由 xilaianzxsc 于 2013-09-25 09:26:19 编辑

解决方案 »

  1.   

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="gbk" />
    <title></title> <style>
    td { border:1px solid red; }
    </style>
    </head>
    <body>
    <table>
    <tr id="test">
    <td>123</td>
    </tr>
    </table>
    <script>
    function $(el){
    return typeof el == 'string' ? document.getElementById(el) : el;
    }

    $('test').style.height = '100px'
    </script>
    </body>
    </html>
      

  2.   

    <table>
    <tr id="tr1" style="background-color:red;"><td>5</td></tr>
    </table>
    <input type='button' value='change' onclick='javascript:document.getElementById("tr1").height=100;' />