search

Home  >  Q&A  >  body text

tbody获得的节点是哪个?

如题,我不知道tbody = document.getElementById('table').lastChild;       获得的节点是哪个,不应该是table的最后一个节点

        <tr>
        <td>xh002</td>
        <td>刘小芳</td>
        <td><a href="javascript:;" >删除</a></td>   <!--在删除按钮上添加点击事件  -->
       </tr> 
吗?

phpcn_u251phpcn_u2512984 days ago803

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:28:13

    Which node does tbody get? -PHP Chinese website Q&A-Which node does tbody get? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 阿神

    阿神2016-12-21 16:47:04

    table下面有两个节点,一个是text空节点,另一个是tbody也就是table的最后一个节点,所有tr和td都在tbody中

    reply
    0
  • Cancelreply