javascript - jQuery read all TD's table data -
javascript - jQuery read all TD's table data -
with jquery reading table:
$('#lc_searchresult > table > tbody > tr').each(function() { var info = $(this).find("td:eq(5)").html(); alert(data); });
it working fine if tr
tag has 1 td
within like:
<tr> <td>654321</td> </tr>
but if having 2 td's
geting first one:
<tr> <td>654321</td> <td>13456</td> </tr>
how can of td's
tr
$(this).find("td:eq(5)").html()
$('#lc_searchresult > table > tbody > tr').each(function() { $(this).children('td').each(function(){ var info = $(this).html(); alert(data); }) });
javascript jquery html
Comments
Post a Comment