Home >Web Front-end >JS Tutorial >jQuery traversing Table application example_jquery

jQuery traversing Table application example_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:53:041053browse
Copy code The code is as follows:

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("The actual quantity cannot be a negative number");
bo = false;
return;
}
if(qty>0)
{
flag = true;
}
vales =qty ",";
}
});

});
if(bo==false)
{
return;
}
$("#vales").val(vales) ;
if(flag==false)
{
alert("Please enter the actual quantity");
return;
}
document.all.sys_submit.click() ;
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn