I want my button to shift its position down, everytime I create a new row in my table (using table.insertRow()). This is my code:
document.getElementById("add").addEventListener("click",function(){
var row = table.insertRow(table.rows.length); //adds new row to the table on button click
})
Now, I have a button
<button id="change">Update</button>
I want this button, to keep on moving down everytime I press the add button to insert new rows in my table, such that the button remains below the table. How do I do that? Please help me.