添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

HTMLTableSectionElement 接口的 insertRow() 方法在给定的表格分段元素( <thead> <tfoot> <tbody> )插入一个新行( <tr> ),然后返回新行的引用。

insertRow() 将行直接插入到分段(section)中,该行不需要像使用 Document.createElement() 创建新的 <tr> 元素那样单独追加。

<button id="add">添加一行</button> <button id="remove">移除最后一行</button> <div>表格主体有 <output>1</output> 行。</div>