jquery获取tr中第一个td的值

来源:互联网 发布:哇掌柜是什么软件 编辑:程序博客网 时间:2024/05/29 17:27

(1)、<td>值</td>

$('#table1  tr').each(function() {
      $(this).find("td:first").text();
    });

(2)、<td><input/></td>

$('#table1  tr').each(function() {
      $(this).find("td:first").find("input").val()
    });

或:

$("#table1 tr:first td:first input:only-child").text()



原创粉丝点击