它在第一行表中添加行 我想添加到最后一行
<script>
function addfunction(){
var table = document.getElementById("mytable");
var row = table.insertRow(2);
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);
cell1.innerHTML = "<input type='number' disabled>";
cell2.innerHTML = "<input type='number' name='price'>";
cell3.innerHTML = "<input type='number' name='count'>";
cell4.innerHTML = "<input type='text' disabled>";
cell5.innerHTML = "<input type='text' name='barcode' onChange='addfunction()'>";
}
</script>