js添加行删除行
时间:2011-01-04 来源:居后不争
id += "mdcYx";
}
var mess = "<input type='input' id='" + id + "'/>";
cell.innerHTML = mess;
}
}
function DelRow(tableID) {
var tab = document.getElementById(tableID);
var rowIndex = tab.rows.length - 1;
if (rowIndex < 1) {
alert("表头无法删除!")
}
else {
tab.deleteRow(rowIndex);
}
}
function DelRow(tableID) {
var tab = document.getElementById(tableID);
var rowIndex = tab.rows.length - 1;
if (rowIndex < 1) {
alert("表头无法删除!")
return false;
}
else {
return true;
}
}