码迷,mamicode.com
首页 > Web开发 > 详细

jquery 遍历表格,需要表格中每个td的内容

时间:2016-07-30 12:00:14      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:

$("table tr:gt(0)").each(function(i){
    alert("这是第"+i+"行内容");
    $(this).children("td").each(function(i){
        alert("第"+i+"个td的内容:"+$(this).text());
    });
});

 

jquery 遍历表格,需要表格中每个td的内容

标签:

原文地址:http://www.cnblogs.com/haimishasha/p/5720464.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!