Home > Web Front-end > JS Tutorial > body text

Summary of nested use of JQuery each()_jquery

WBOY
Release: 2016-05-16 16:51:51
Original
1508 people have browsed it

Note: function(i){} can bring i, indicating index. And JavaScript object

Copy code The code is as follows:

var startObj = {}; //Declaration js object

$("#tabT").find("tr").each(function(i){
var uuid = '';
$(this).find(" input[type='hidden']").each(function(j){
if(j==0){
uuid = $(this).val();
}
startObj[uuid '_' j] = $(this).val();
});

});

$("#tabT").find(" tr").each(function()
{
var sameFlag = "1";
var uuid = '';
$(this).find("input[type='hidden' ]").each(function(j){
if(j==0){
uuid = $(this).val();
}
if(startObj[uuid '_ ' j]!=$(this).val()){
sameFlag = '0';
allSameFlag = "0";
}
});

} );
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