linux1880 Posted June 17, 2010 Share Posted June 17, 2010 how do i add input fields dynamically in javascripts ? Quote 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> Quote 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 ? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.