I want to create below html inputs dynamically using jQuery inside the form. Is this possible using jQuery?
<div class="form-group">
<label class="col-sm-2 control-label">Enter Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="nameId" name="fullNme" placeholder="Enter full Name">
</div>
</div>
I want to place the above dynamic div and texbox under div class="box-body"
<form id="myform" class="form-horizontal" method="post">
<div class="box-body">
</div>
</form>
Can someone help how can I achieve in Jquery/Javascript?
Appreciate your help in advance!
$('YOURCLICK').on('click',function(e){ $('box-body').append('<input type="text" class="YOURCLASS" name="YOURNAME[]">') })