var obj_table1 = document.getElementById("table1的id");
var obj_table2 = document.getElementById("table2的id");
var obj_table3 = document.getElementById("table3的id");obj_table1.style.pixelHeight = obj_table2.clientHeight - obj_table3.clientHeight;

解决方案 »

  1.   

    <table id="t1" width="400" height="300" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;T1</td>
      </tr>
    </table><br /><table id="t2" width="400" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;T2</td>
     </tr>
       <tr>
        <td>&nbsp;</td>
     </tr> 
       <tr>
        <td>&nbsp;</td>
     </tr> 
    </table><br /><table id="t3" width="400" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;T3</td>
     <td>&nbsp;</td>
      </tr>
    </table>
    <script language="javascript" type="text/javascript">
    function $()
    {
      var h2=getId("t2").clientHeight;
      var h3=getId("t3").clientHeight;
      var newHeight=parseInt(h2)-parseInt(h3)
       if(newHeight>0)
       getId("t1").style.height=newHeight+"PX";//支持IE、FF的写法
    }
    function getId(id)
    {return document.getElementById(id);}
    </script>
    <input name="" type="button" onClick="$()" value="测试" />