I currently have one table and added 2 rows with 2 columns.
Beside this table there is a +plus button. How can I make it so when I click on the plus button, that a new row is added.
I currently have one table and added 2 rows with 2 columns.
Beside this table there is a +plus button. How can I make it so when I click on the plus button, that a new row is added.
Does this help: https://jsfiddle.net/zew7d8p1/26/
var button = document.getElementById('niceButton');
button.addEventListener('click',function(e){
var table = document.getElementById('niceTable');
var row = table.insertRow(0);
var td1 = row.insertCell(0);
var td2 = row.insertCell(1);
td1.innerHTML = 'new cell';
td2.innerHTML = 'new cell';
},false);