标签:style blog color io ar div cti log
//jquery数组遍历 var arr = [1,2,3]; $.each(arr, function(i,val){ console.log(i); console.log(val); });
0,1
1,2
2,3
下面这个还可以多看看,高程P96
//js数组遍历 5中 var numbers = [1,2,3,4,5,6]; var everyResult = numbers.every(function(item,index,array){ console.log(item); console.log(index); console.log(item); return item; }); everyResult();
//jquery包装器的遍历 $(‘.content-hot-slider input‘).each(function(){ var text = $(this).val(); if (/^[\u4e00-\u9fa5]{1,4}$/.test(text)) { check[i] = true; } else { check[i] = false; } });
jquery包装器遍历和数组遍历小结,布布扣,bubuko.com
标签:style blog color io ar div cti log
原文地址:http://www.cnblogs.com/cjy1993/p/3928973.html