Reputation: 343
I am trying to write some javascript to allow me to click on a link which will add a row of form elements to a html page. It is basically a page to add names to a page and submit them.
The form layout is [Title] [Firstname] [Lastname]
I need to be able to add a new row and delete any row from the list dynamically.
Can anyone help me with this as im totally lost with javascript :(
Thank you in advance for any help given :)
Upvotes: 0
Views: 106
Reputation: 16051
The easiest way is to use kQuery append()
or appendTo()
. For more info : http://api.jquery.com/.
$('<td><input /><input /><input /></td>').insertAfter("#idTable>tr:last);
That should go the trick !
Upvotes: 1