<input type=button value="Add" οnclick='additem("tb")'>
<table id="tb"></table>
<script language="javascript">
function additem(id){
var row,cell,str;
row = eval("document.all["+'"'+id+'"'+"]").insertRow();
if(row != null ){
cell = row.insertCell();
str="<input type="+'"'+"file"+'"'+" name="+'"'+"addfile"+'"'+"><input type="+'"'+"button"+'"'+" value="+'"'+"delete"+'"'+" οnclick='deleteitem(this,"+'"'+"tb"+'"'+");'>"
cell.innerHTML=str;
}
}
function deleteitem(obj,id){
var rowNum,curRow;
curRow = obj.parentNode.parentNode;
rowNum = eval("document.all."+id).rows.length - 1;
eval("document.all["+'"'+id+'"'+"]").deleteRow(curRow.rowIndex);
}
</script>