开发者

ASP MVC add textboxes with jquery

I am new to jQuery, but I would like to have a button that when clicked will add more textboxes to a page. I have three textboxes that contain data of the same type and if the user has more data of the same type to enter, I would like to pop up three more textboxes.

What would be the best 开发者_如何学Pythonway to go about that?


I'd recommend reading Editing a variable length list, ASP.NET MVC 2-style by Steve Sanderson. It explains how to achieve what I believe you are trying to do.


$("<input type='text' name='as_it_should_be'>").append(...).

Check jQuery documentation.

Regarding Asp.net MVC model binding to collections of data, this may help as well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜