tags:

views:

22

answers:

1

Hello,

I have a column of input boxes and have a button for the last row to add more input boxes below the last input box. Is there a best way to do this ?

+1  A: 

You can go about something like this:

function addTextBox()
{
  var container = document.getElementById('container');
  var txt = document.createElement('input');
  txt.type = 'text';
  txt.name = "my name";

  container.appendChild(txt);
}

In the above code, container is supposed to be your column id which contains text boxes.

Sarfraz