console.log("Loaded"); function update(){ console.log("UPDATED!"); } function NewLine() { var newline = document.getElementById("inprow"); var clonedRow = newline.cloneNode(true); // Clone the row (true means deep clone, copying all children) document.getElementById("maintable").appendChild(clonedRow); // Append the cloned row to the table }