JSFiddle - React, Tailwind, and code Playground
by dying_sakura
HTML
<div id="div1">
<form class="thisformtobeaddeverytime">
<!-- this form to be add on click #btn1 -->
<input type="text">
</form>
</div>
<div id="showtheaddedform">
//here my form will be push on click to button
</div>
<button type="button" id="btn1">Add the form1</button>
CSS
.error
{
color:red;
}
JavaScript
$(document).on("click","#btn1",function(){
$("#showtheaddedform").append($("#div1").html());
});
$("body").on("click","#btn2",function(){
$("#showtheaddedform").append($("#div2").html());
} );