ard
ard

Reputation: 343

Adding multiple form elements to a form

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

Answers (1)

David Laberge
David Laberge

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

Related Questions