var i = 1;
$('.button').click(function() {
$('<br/><input name="name' + (++i) + '" type="text"/>').insertBefore(this);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div>
<input name="name1" type="text" /><button class="button">+</button>
</div>
How can I place a button with [ + ] plus button, and when I click on it. button remove that field.
+button? Like how it is!! Atleast onebuttonandtextboxshould be there right?-BUTTON when I click on it last field remove.JSI've tried alot but....