function show() {
var tab = document.getElementById("test");
//表格行数
var rows = tab.rows.length;
//表格列数
var cells = tab.rows.item(6).cells.length;
alert("行数" + rows + "列数" + cells);
var td = tab.rows.item(6).insertCell(0);
tab.rows.item(6).appendChild(td);

}
<input type="button" onclick="show();" />

相关文章:

  • 2021-05-08
  • 2021-12-26
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2021-12-12
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案