最初の 2 つの列に 2 つのイメージボタンをレンダリングする Datatable があります。
<tr>
<td>Button 1
<td>Button 2
</tr>
<tr>
<td>Value<td/>
これを使用して、対応するクリックの値を取得しようとしています:
$('[id$=releaseMessage]').click(function () {
alert($('td:eq(2)', this).html());
});
$('[id$=deleteMessage]').click(function () {
alert($('td:eq(2)', this).html());
});
値は行ごとに異なるため、次のようなものを使用できます。
tr:eq(0) td:first-child
これは常に最初の td 値を返すためです。