JSFiddle - React, Tailwind, and code Playground

by Deepak Manwal

HTML

<form class='cform' method="POST">
<table border='0' style='background: #1D7373; border-bottom: 1px solid #2e9c9c; color:white; width:100%;'>
    <tr class="addforms">
   <td><input class='txtedit' placeholder='Name' type='text'  name='Name' maxlength='130' /></td>

<td><a class="remove">[X]</a></td>
</tr>
         <input style='width: 60px;' type='button' class='clone' value='+' />
    </table>
    </form>

JavaScript

$(function(){

$('.remove').click( function(event) {
    event.preventDefault();
     $(this).parents(".addforms:last").remove();
 
    });


  $('.clone').click(function(){ $(".addforms:last").clone().find("input[type='text']").val('').end().insertBefore($(".addforms:first"));
  });
    
    });