我有一張桌子,我想向它添加一個新行,但它不起作用我想復制它的第一行,因為它就像新行的模板,然后我想將它附加到正文但由于某種原因它不起作用,即使我沒有收到任何錯誤這里是我的代碼:// getting the body of the tablevar tableBody = document.getElementById("tableBody");// getting the row templatevar newRow = document.getElementById("tableRow").cloneNode(true);// trying to add ittableBody.appendChild(newRow);
無法向 HTML 表格添加新行
守著星空守著你
2023-03-24 14:56:59