我有多个跨越多列的列标题,我想为这些列找到正确的标题编号/计数。
我想输入一个列号并获取标题:示例第 5 列是 RDataTest6 $('td.eq(5)) 并且它的标题是 HTest3 $('th.eq(2))
例子:
<table>
<tr>
<th>HTest1</th>
<th colSpan="2">HTest2</th>
<th colSpan="4">HTest3</th>
<th colSpan="2">HTest4</th>
</tr>
<tr>
<td>RDataTest1</td>
<td>RDataTest2</td>
<td>RDataTest3</td>
<td>RDataTest4</td>
<td>RDataTest5</td>
<td>RDataTest6</td>
<td>RDataTest7</td>
<td>RDataTest8</td>
<td>RDataTest9</td>
</tr>
</table>
</p>