0
我試圖合併具有相同文本內容的8列中的單元格。 我可以看到,在下面 - merging <td> rows in one column of html table,但在時間上的1列這只是作品,當被告知通過列循環,這是行不通的Jquery - 合併多個列中的單元格相同
如何在一個表中做了所有列的任何想法?
我試圖合併具有相同文本內容的8列中的單元格。 我可以看到,在下面 - merging <td> rows in one column of html table,但在時間上的1列這只是作品,當被告知通過列循環,這是行不通的Jquery - 合併多個列中的單元格相同
如何在一個表中做了所有列的任何想法?
確定的工作了
,而不是通過循環正常,我看着向後和它的工作:)
您可以通過在「tr」級循環數據並消除重複條目來實現該目的,添加「rowspan」。
以下代碼段將您有所幫助,
$('#tblNewAttendees tr').each(function() {
//initate the rowcount here
$.each(this.cells, function(){
//use after function to append the cell
$(this).find('td').eq(0).after('<td rowspan=rowcount class="table-rowspan">==>fooo <== </td>');//instead of eq(0) use the number position you want to append
});
});
顯示更新的代碼。這個解釋很簡單,幾乎沒用。 – Barmar