<table id="myTable">
<tr>
<th>Record</th>
</tr>
</table>
<button onclick="addRows()">Add Rows</button>
<script>
counter = 0;
function addRows() {
let table = document.querySelector("#myTable");
let row = document.createElement("tr");
let tableData = document.createElement("td");
tableData.textContent = counter;
counter += 1;
table.appendChild(row)
table.appendChild(tableData);
}
</script>