0
我想獲取多個數據到表中,但有一行是複製totalColumn,當我刪除重複,其餘的駐留在表前。我想我來排的是前移到表的末尾如何刪除錶行到其他行的末尾
<table>
<tbody>
...
<tr class="totalColumn">
<td>Total</td>
<td></td>
<td></td>
<td class="sumofamount">@FuelHistory.sumOfTwo(d.driver.Id) Litres</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
的Javascript用於刪除行:
$('.totalColumn').each(function() {
var thisId = $(this).find('.sumofamount').text();
var $rowsToGroup = $(this).nextAll('tr').filter(function() {
return $(this).find('.sumofamount').text() === thisId;
});
$rowsToGroup.each(function() {
$(this).remove();
}
);
表格行如何左移?或者你的意思是,如果該行有重複項,你希望他們在表的末尾刪除重複項? – epascarello
你的問題是不清楚的...什麼意思左行..顯示一個適當的數據樣本和預期的結果 – scaisEdge
我的意思是我需要它到表的末尾的其餘行。 –