I have a table in a form like this
<form> <table> <tbody id='target'> <tr id="dolly"><td><input name="hobby" /></td></tr> </tbody> </table> </form>
I also have a button to add a new row, by cloning the 'dolly' tr and appending to 'target'
<input type="button" onclick="AddRow('dolly', 'target') />
newRow.td.input.name = "hobby";