全てにおいて良い日、
以下のような行と値を持つテーブルがあります
<tr id="value_12">
<td>firstanme_1</td>
<td>lastname_1</td>
</tr>
<tr id="value_14">
<td>firstanme_2</td>
<td>lastname_2</td>
</tr>
そして、私が使用しているjqueryは(明らかに間違っています)です。
$('#table_id tr').each(function() {
serializedData += '&' + $(this).attr('id') + '=' + $(this).attr('id')+'_'+$(:first_child).text();
});
serialisedData 文字列の最後の部分 (区切り文字 '_' の後の最後の値) として、各 tr の最初の ie firstname と tr 属性のみを抽出しようとしています。
i は $(this).firstchild().text() のようなものかもしれませんが、うまくいかないようです。この場合、最初の子供を得る正しい方法を教えてください。