我将Excel文件转换为html表格,我没有<thead></thead>
个标签,因此我使用floatThead插件执行此操作:
$( document ).ready(function() {
var table = $('#sheet0'); // select the table of interest
var thead = $('<thead/>').prependTo(table); // create <thead></thead>
table.find('tbody tr.row0').appendTo(thead);
$('table.sheet0').floatThead({
position: 'fixed',
index: '8',
overflow: 'auto'
});
});
初始“tbody tr.row0
”html(在floatThead操作之前):
<thead><tr class="row0">
<td class="column0 style47 s">Title 1</td>
<td class="column1 style8 s">Client</td>
<td class="column2 style8 s">Title 3</td>
<td class="column3 style9 s">Déclarant</td>
<td class="column4 style8 s">Date ouv.</td>
<td class="column5 style61 s">Date</td>
<td class="column6 style53 s">IWS</td>
<td class="column7 style9 s">Solution</td>
<td class="column8 style9 s">Description</td>
<td class="column9 style8 s">Actions</td>
<td class="column10 style58 s">Lorem</td>
<td class="column11 style7 s">Lorem</td>
<td class="column12 style10 s">Lorem</td>
<td class="column13 style10 s">Lorem</td>
</tr></thead>
在floatThead操作之后和(我不知道为什么):
<thead>
<tr class="size-row" aria-hidden="true" style="height: 46px;">
<th class="floatThead-col" aria-label="Title 1" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Client" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Title 3" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Déclarant" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Date ouv." style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Date" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="IWS" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Solution" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Description" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Actions" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Lorem" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Lorem" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Lorem" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="Lorem" style="height: 44px;"></th>
// HERE WHY ? i dont know //
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
<th class="floatThead-col" aria-label="" style="height: 44px;"></th>
</tr>
</thead>
显示空白列并更改表格宽度...
那么,我如何正确克隆我的第一行或删除带有空aria-label的th.floatThead-col?
与n-child?
由于