I have a problem that i have been working on for too long, how can i add rows and remove rows from a form dynamically using javascript?

What i need is two buttons, one to add a row and the other to remove the row. How would i do this?

In this form i have, on one line, a couple of text boxes, is this possible to achieve, on an HTML form not an HTML table


Without the table, I'm not certain there's a solution. The table wouldn't need to be particularly complicated.

     <table name="mytable" id="mytable">
               <td><input type="button" value="Add Row" onclick="addrow('mytable')"></td>
               <td><input type="button" value="Subtract Row" onclick="subtractrow('mytable')"></td></tr>

function addrow(el){
	usertbl = $(el);
	srow = usertbl.insertRow(numRows(el)+1);
	cell1 = srow.insertCell(0);
        element1 = document.createElement('input');
function subtractrow(el){
		usertbl = $(el);
		srow = usertbl.deleteRow(numRows(el));