jQuery 获取遍历获取table中每一个tr中的第一个td的方法
如下所示:
<tbodyid="already_question_list">
<tr>
<td><?phpecho$val['unique_number'];?></td>
<td><?phpecho$val['year'].'-'.$val['series'];?></td>
<td><?phpecho$val['content']?></td>
<td><?phpecho$val['knowledges']?></td>
<td><?phpecho$val['last_admin'];?></td>
<td>
<inputtype="button"class="btn"value="-"data-score="<?phpecho$val['score'];?>"onclick='remove_selected(this);'/>\
<inputtype="hidden"name="question_numbers[]"value="<?phpecho$val['unique_number'];?>"/>
</td>
</tr>
</tbody>
<script>
varleng=$("#already_question_listtr").length;
varfilter_numbs=newArray();
for(vari=0;i<=leng;i++)
{
numberStr=$("#already_question_listtr").eq(i).find("td:first").html();
filter_numbs.push(numberStr);
}
</script>
以上就是小编为大家带来的jQuery获取遍历获取table中每一个tr中的第一个td的方法全部内容了,希望大家多多支持毛票票~