87,997
社区成员




function deleteRow(index){
var tbody = $("#ItemsTable tbody:last"),
tr = $("tr", tbody);
if(tr.length == 1 || index > 0){
tr.eq(index).remove();
}
if(tr.length > 1 && index == 0){
var next = tr.eq(1), cur = tr.eq(0);
$("td", cur).each(function(index, td){
if($(td).attr("rowspan")){
$(td).insertAfter($("td", next).eq(index - 1));
}
});
cur.remove();
}
}
function deleteRow(index){
var tbody = $("#ItemsTable tbody:last"),
tr = $("tr", tbody);
if(tr.length == 1 || index > 0){
tr.eq(index).remove();
}
if(tr.length > 1 && index == 0){
var next = tr.eq(1), cur = tr.eq(0);
$("td", cur).each(function(index, td){
if($(td).attr("rowspan")){
next.append(td);
}
});
cur.remove();
}
}
//删除选中行
function delRow() {
$("input[name='IsValid']").each(function (index, row) {
if ($(this).prop("checked")) {
//$(this).parents("tr[name=行名]").remove();
deleteRow(index);
}
});
}