JSFiddle - React, Tailwind, and code Playground
by mori57
HTML
<table>
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
</tr>
</thead>
<tbody>
<tr id="row1">
<td>Value 1.1</td>
<td>Value 1.2</td>
</tr>
<tr id="row2">
<td>Value 2.1</td>
<td>Value 2.2</td>
</tr>
<tr id="AddNewRows">
<td><input type="button" id="AddRows" value="Add New Rows"/></td>
</tr>
</tbody>
</table>
JavaScript
$("#AddRows").click(function () {
$("#AddNewRows").before(
'<tr id="row3"><input type="hidden" value="33" id="hiddenRow3" /><td>Value 3.1</td><td>Value 3.2</td></tr>');
});