📜  解决方案 - Html 代码示例

📅  最后修改于: 2022-03-11 14:52:53.229000             🧑  作者: Mango

代码示例1
function myFunction()
        {
         var table = document.getElementById("table");
         var Row = table.insertRow(table.length);
         var cell1 = NewRow.insertCell(0);
         var cell2 = NewRow.insertCell(1);
         var cell3 = NewRow.insertCell(2);
         fname = document.getElementById("fname").value;
         lname = document.getElementById("lname").value;
         age = document.getElementById("age").value;
         
         cell1.innerHTML = "fname";
         cell2.innerHTML = "lname";
         cell3.innerHTML = "age";
         
        }