开发者

Is there a jquery plugin to make it to dynamically add textfields in a webform

开发者 https://www.devze.com 2023-04-12 03:17 出处:网络
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 plu

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消