web前端|html教程
[转]jquery遍历table的tr获取td的值 – CQ_LQJ
web前端-html教程
html代码:
php开发的房产中介源码,ubuntu重新启动,爬虫网站有毒吗,eregi() php,临安seo营销lzw
1 2
qq导航页源码下载,ubuntu驱动怎么安装,tomcat8输出台乱码,爬虫恐怖小说,php数据的基础知识,徐汇seo报价lzw
方法一:
导航 博客 源码,ubuntu动物是什么,tomcat7多域名证书,影视爬虫php源码,php开发分享交流学习,seo岗位划分lzw
var trList = $("#history_income_list").children("tr") for (var i=0;i<trList.length;i++) { var tdArr = trList.eq(i).find("td"); 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); }
方法二:
$("#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);});