linux1880 Posted June 17, 2010 Share Posted June 17, 2010 how do i add input fields dynamically in javascripts ? Link to comment https://forums.phpfreaks.com/topic/205030-how-to-add-input-fields-dynamic-in-javascripts/ Share on other sites More sharing options...
trq Posted June 17, 2010 Share Posted June 17, 2010 Pretty vague question, but using jQuery it could be as simple as.... <a class="adder" href="#">Add New</a> <script> $('.adder').click(function() { $('.adder').after('<input type="text" name="in[]">'); }); </script> Link to comment https://forums.phpfreaks.com/topic/205030-how-to-add-input-fields-dynamic-in-javascripts/#findComment-1073335 Share on other sites More sharing options...
linux1880 Posted June 17, 2010 Author Share Posted June 17, 2010 in plain javacript ? Link to comment https://forums.phpfreaks.com/topic/205030-how-to-add-input-fields-dynamic-in-javascripts/#findComment-1073676 Share on other sites More sharing options...
trq Posted June 18, 2010 Share Posted June 18, 2010 We are not here to write code for people. Post your attempt and a description of your problem. Link to comment https://forums.phpfreaks.com/topic/205030-how-to-add-input-fields-dynamic-in-javascripts/#findComment-1073841 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.