您好,欢迎来到尚车旅游网。
搜索
您的当前位置:首页[转]jquery遍历table的tr获取td的值-CQ_LQJ

[转]jquery遍历table的tr获取td的值-CQ_LQJ

来源:尚车旅游网

html代码:

 1 
 2 
 3 
 4 
 5 
 6 删除
 7 
 8 
 9 
10 
11 
12 删除
13 
14 
15 
16 
17 
18 删除
19 
20 
21   

 

方法一:

var trList = $("#history_income_list").children("tr")
 for (var i=0;i

方法二:

$("#history_income_list").find("tr").each(function(){
 var tdArr = $(this).children();
 var history_income_type = tdArr.eq(0).find("input").val();//收入类别
 var history_income_money = tdArr.eq(1).find("input").val();//收入金额
 var history_income_remark = tdArr.eq(2).find("input").val();// 备注
 
 alert(history_income_type);
 alert(history_income_money);
 alert(history_income_remark);
 
 
 });

Copyright © 2019- sceh.cn 版权所有 湘ICP备2023017654号-4

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务