JSFiddle - React, Tailwind, and code Playground
by sjord010
HTML
<table cellpadding="0" cellspacing="0" border="0" id="TableID">
</table>
<input id="btn" value="test" type="button" />
CSS
table
{
border: 1px solid black;
}
JavaScript
$('#btn').click(function() {
var html = '';
html += "\
<tr>\
<td>Row1\
<table>\
<tr>\
<td>\
</td>\
</tr>\
</table>\
</td>\
</tr>\
<tr>\
<td>Row2\
</td>\
</tr>";
$('#TableID').html(html);
var newhtml = "<tr><td>Row3</td></tr>";
$('#TableID').append(newhtml);
});