function insRow(){ document.getElementById("rowId").value=parseInt(document.getElementById("rowId").value)+1; var rowId = document.getElementById("rowId").value; var tb1 = document.getElementById("ctable");
var rowsCount=tb1.rows.length;
var row = tb1.insertRow(rowsCount);
var cell = row.insertCell(0);
cell.innerHTML="<img src=\"<%=contextPath%>/img/update.gif\" class=\"nav\" />";
var cell = row.insertCell(1);
cell.innerHTML="<input name=\"companyname"+rowId+"\" ID=\"companyname"+rowId+"\" type=\"text\" />";
var cell = row.insertCell(2);
cell.innerHTML="<input name=\"companynameen"+rowId+"\" ID=\"companynameen"+rowId+"\" type=\"text\" />";
}
变态的IE
//div.appendChild(eleTable);
//div.insertBefore(temp,null);
//div.appendChild(temp);