私の問題については多くのポストトークが見られましたが、私にとってはどちらかの作業があります。JQueryでhtmlテーブルのセル値を取得する方法
私はこのhtmlテーブルを持っています、私はセル(th) "インデックス"の下の値を取得するでしょう。 どのように私は
var tharr=[];
$("#htmlTable").find("tbody tr").each(function(){
tharr.push($(this).find("td:eq(0)").text());
});
alert(tharr.join(",")); //by this you get 0,1
来相対TD値番目の本で、この
<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>
私はそれを取得しない問題を理解するためのjQueryのhttps://codepedia.info/jquery-get-table-cell-td-value-div/ –