document.all.mytable.rows.length //行数
document.all.mytable.rows(i).cells.length //第i行的列数

解决方案 »

  1.   

    :D
    曾分。。
    <table id="wc" width="150" border="1">
      <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
      </tr>
    </table>
    <script type="text/javascript">
    window.onload = function () {
    var wc = document.getElementById("wc").getElementsByTagName("tbody")[0];
    alert("行数:" + wc.rows.length + "\n" + "第一行列数:" + wc.rows[0].cells.length);
    };
    </script>
      

  2.   

    document.all.mytable.rows.length   //行数 
    document.all.mytable.rows(i).cells.length   //第i行的列数
    正解!
      

  3.   

    document.all.mytable.rows.length  //行数
    document.all.mytable.rows(i).cells.length  //第i行的列数
    完全正确