rt

解决方案 »

  1.   

    中括号一定要加吗?以前看到的都是object.deleteRow(obj)的...
      

  2.   


    <table style="width:200px;height:100px;border:1px solid red" id="otable">
    <tr>
    <td>1</td>
    </tr>
    <tr>
    <td>2</td>
    </tr>
    <tr>
    <td>3</td>
    </tr>
    </table>
    <input type="button" value=" Delete The Second Row " onclick="delRow()" />
    <script type="text/javascript">
    <!--
    function delRow(){
    document.getElementById("otable").deleteRow(1);
    }
    //-->
    </script>