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

jQuery traversing Table application example_jquery

WBOY
Release: 2016-05-16 16:53:04
Original
1011 people have browsed it
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() ;
}
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template