当前位置:Gxlcms > JavaScript > jQuery遍历Table应用示例_jquery

jQuery遍历Table应用示例_jquery

时间:2021-07-01 10:21:17 帮助过:9人阅读

代码如下:

function checkwo(){
var vales = "";
$("#vales").val(vales);
var flag = false;
var bo = true;
$("#data_table").find("tr").each(function(){
$(this).find("td input").each(function(){
if($(this).attr("name")=="rid")
{
vales+=$(this).val()+"&";
}
if($(this).attr("name")=="qty")
{
var qty = $(this).val();
if(qty<0)
{
alert("实盘数量不能为负数");
bo = false;
return;
}
if(qty>0)
{
flag = true;
}
vales+=qty+",";
}
});

});
if(bo==false)
{
return;
}
$("#vales").val(vales);
if(flag==false)
{
alert("请输入实盘数量");
return;
}
document.all.sys_submit.click();
}

人气教程排行