document.all.myTable.rows[0].deleteCell()

解决方案 »

  1.   

    <body onclick=a1.removeNode(true);alert(a2.outerHTML)>
    <table id=a2>
    <tr><td id=a1>123</td></tr>
    </table>
      

  2.   

    to meizz(梅花雨):
    我是这样用的
    document.getElementById("tr"+"StatusBar").deleteCell();
    其中deleteCell()可否加参数,参数为具体某个td.
      

  3.   

    taskTd.removeNode(true);
    document.getElementById("tr"+"StatusBar").deleteCell();
    两种方法都可以删除td,不过只局限于IE中。寻求Netscape中的用法?我现在做的东东要支持两种浏览器。
      

  4.   

    removeNode()是W3C DOM中的方法,NS不支持?
      

  5.   

    to bencalie(Bencalie):
    以下代码在NS通不过,不信的话,你试试先。
    <button onclick=a1.removeNode(true);></button>
    <table id=a2>
    <tr><td id=a1>123</td></tr>
    </table>
      

  6.   

    对于表格操作建议使用表格专用操作函数..否则在不同的浏览器版本中可能会造成问题..
    至于别的对象操作用
    appendChild其相反操作为:removeChild