Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to dynamically add textbox in asp.net mvc

how to dynamically add and remove textbox in asp.net mvc

like image 232
Fraz Sundal Avatar asked Jan 31 '26 12:01

Fraz Sundal


1 Answers

Here is a quick and dirty solution:

$('<input type="text" name="myTextBox" />').appendTo(document.body);

The appendTo method accepts quite a lot of things - dom elements, other jQuery objects, selectors. You may also want to check the other DOM manipulation methods.

like image 145
Atanas Korchev Avatar answered Feb 03 '26 05:02

Atanas Korchev