JSFiddle - React, Tailwind, and code Playground
HTML
<form method="post" action="#D" onSubmit="return validateForm();" name="form1" id="form1">
<fieldset>
<br/> <a name="D"></a>
temp row value
<input name="rowcounter" id="rowcounter" type="text" maxlength="255" value="1">
<br>
<br>
<br>
<table border="0" class="Mytable" id="Mytable">
<tr>
<td>
<p>
<select name="Profession1" id="Profession1" tabindex="7" class="Profession">
<option value="0">-- Select Category--</option>
<option value="1">I am</option>
<option value="2 Club">I am not</option>
</select>
</p>
<p>
<label for="FName1" class="Fname">First Name</label>
<br />
<input type="text" name="FName1" id="FName1" value="" class="Fname" onkeypress="return handleEnter(this, event)">
</p>
<p>
<label for="LName" class="Lname">Last Name</label>
<br />
<input type="text" name="LName1" id="LName1" value="" class="Fname" onkeypress="return handleEnter(this, event)">
</p>
</td>
<td>
<p>
<label for="Address1" class="Address">Home Address</label>
<br />
<input type="text" name="Address1" id="Address1" value="" class="Address" onkeypress="return handleEnter(this, event)">
</p>
<p>
<label for="City1" class="City">City</label>
<br />
<input type="text" name="City1" id="City1" value="" class="City" onkeypress="return handleEnter(this, event)">
</p>
...
CSS
form legend {
color: #C9C9C9;
padding: 0 0 20px 0;
text-transform: uppercase;
}
form {
padding: 0 20px 20px 20px;
}
form, form fieldset input, form fieldset textarea, form label {
font-family: Helvetica, Arial;
font-size: 12pt;
}
form p {
position: relative;
margin: 10px 0;
}
form p label {
position: absolute;
top: 0;
left: 0;
}
form p br {
display: none;
}
form fieldset p input, form fieldset p textarea {
display: block;
padding: 4px;
width: 400px;
margin: 0;
}
form fieldset p label {
display: block;
margin: 5px 5px 5px 6px;
padding: 0;
color:#C9C9C9 !important;
}
form fieldset p textarea {
padding: 2px;
width: 404px;
}
form fieldset p textarea, form fieldset p input {
border: solid 1px #ccc;
}
form fieldset p label {
color: #777;
}
JavaScript
$("#AddPerson").click(function () {
$('.Mytable').clone().insertAfter(".Mytable");
$('#rowcounter').val(function (i, oldval) {
return ++oldval;
});
});