现在每次增加行的时候总在插在最前面一行,js的代码怎样改一下让它增加一行的时候插入在最后一行
现在每次增加行的时候总在插在最前面一行,js的代码怎样改一下让它增加一行的时候插入在最后一行
body{background:#FFFFFF;}
function add(){
var oTr = document.getElementById("addtr").rows[1];
var newTr = oTr.cloneNode(true);
document.getElementById("addtr").getElementsByTagName("tbody")[0].appendChild(newTr);
newTr.cells[0].firstChild.value = newTr.rowIndex;
document.getElementById("b1").disabled = newTr.rowIndex ==5 ;
}
ID | Username | Usertype | Other | 我有添加了一行 |
Administrator |
展开