0
function addRow() {
var a = document.getElementById("modulename").value;
var b = document.getElementById("duedate").value;
var c = document.getElementById("duetime").value;
var d = document.getElementById("worktype").value;
var e = document.getElementById("notes").value;
//var f = <input type="checkbox" id="complete" value="no">
var table = document.getElementById("myTable");
var row = table.insertRow(1);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
var cell5 = row.insertCell(4);
//var cell6 = row.insertCell(5);
cell1.innerHTML = a;
cell2.innerHTML = b;
cell3.innerHTML = c;
cell4.innerHTML = d;
cell5.innerHTML = e;
//cell6.innerHTML = e;
//document.getElementById("myTable").innerHTML = x;
我已經註釋了代碼的複選框部分,因爲它之前沒有運行,新的HTML,任何幫助表示讚賞。如何將複選框添加到表中
我一直停留在它一兩個小時,現在,只是無法弄清楚什麼是錯。