我看到很多帖子都谈论了我的问题,但没有一个对我有效。
我有一个HTML表格,我想获取单元格(th)“Index”下的值。我该如何使用jQuery实现:
<table id="htmlTable">
<caption>Informations des hotspots</caption>
<thead>
<tr>
<th>Index</th>
<th>Nom du hotspot</th>
<th>Image du hotspot</th>
</tr>
</thead>
<tbody>
<tr id="0">
<td>0</td>
<td>Hotspot Fribourg Centre</td>
<td>../images/logos_hotspot/logo_wifi_centre.png</td>
<td>
<input type="button" value="supprimer" />
</td>
</tr>
<tr id="1">
<td>1</td>
<td>Hotspot Avry Centre</td>
<td>../images/logos_hotspot/logo_wifi_avry.png</td>
<td>
<input type="button" value="supprimer" />
</td>
</tr>
</tbody>
</table>