JSFiddle - React, Tailwind, and code Playground
HTML
<table width="90%" align="center" class="clone_table">
<tr>
<th>Select</th>
<th>First Name</th>
<th>Last Name</th>
<th width="5%"></th>
</tr>
<tr>
<td><input type="radio" id="firstname1" /></td>
<td><input type="text" id="lastname1" /> </td>
<td><input type="text" /> </td>
<td><a href="#" class="add_row">+</a></td>
</tr>
</table>
CSS
th{
text-align:left;
background: #77CFE4;
padding:5px 4px;
}
td{
background: #E0F9FF;
padding:4px 8px;
}
input{
background:transparent;
border: solid 1px #A9A9A9
}
.add_row, .rem_row {
display: inline-block;
padding: 10px 4px;
border: solid 1px #969696;
width: 24px;
text-align: center;
font-size: 25px;
line-height: 1px;
font-weight: bold;
color: #ffffff;
text-decoration: none;
text-decoration: none;
background: #106377;
}
JavaScript
//Clone row
$(".clone_table").delegate( '.add_row', 'click', function (e) {
e.preventDefault();
var thisRow = $( this ).closest( 'tr' )[0];
$( thisRow ).clone().insertAfter( thisRow ).find( 'input:text' ).val( '' );
$(this).html("-").addClass("rem_row").removeClass("add_row");
$('.rem_row').click(function(){
$(this).parent().parent().remove();
});
});