hoge.html
<table id="xx" border="1">
</table>
<script>
function RowCellLength(table){
console.log("row-length:", table.rows.length)
// console.log("cell-length:", table.rows[0].cells.length)
}
function createTable(table, dates,rows) {
newRow = table.insertRow(rows)
for (let i=0; i<dates; i++) {
newCell = newRow.insertCell(0)
newCell.colSpan = "1" //colspan="1"をセット
newCell.rowSpan = "1" //rowspan="1"をセット
newCell.innerHTML = "new cell" //セルの中に値を入力
}
newCell = newRow.insertCell(0)
newCell.colSpan = "1" //colspan="1"をセット
newCell.rowSpan = "2" //rowspan="2"をセット
newCell.innerHTML = "hogehoge"
newRow1 = table.insertRow(rows+1)
for (let i=0; i<dates; i++) {
newCell = newRow1.insertCell(0)
newCell.colSpan = "1" //colspan="1"をセット
newCell.rowSpan = "1" //rowspan="1"をセット
newCell.innerHTML = "new cell" //セルの中に値を入力
}
}
var members = 10
var dates = 10
for (let i=0; i<members; i++) {
createTable(xx, dates,2*i)
}
</script>