Is there a jquery plugin to make it to dynamically add textfields in a webform
I am seeking a jquery plugin 开发者_StackOverflow社区to dynamically add textfields in a webform by clicking a 'add' icon. The number of the textfield is arbitrary. Does anybody knows some jquery plugins that can do this?
Do you really need a plugin for that? You can use append
to append content to an element:
$("#button").click(function() {
$("#yourForm").append("<input type='text'>");
});
The argument passed to append
can be an arbitrary string of HTML, a DOM element, or a jQuery object (if, for example, you wanted to clone an existing input
and append that).
精彩评论