标签:
1.each()
$(selector).each(function(index,element))
var arr = [ "a", "bb", "ccc" ];      
    $.each(arr,function(i,a){
        console.log(i+":"+a);
    });
//直接对jquery对象遍历
    $(arr).each(function(i,a){
        console.log(i+":"+a);
    });
其中,i是遍历对象的遍历顺序,a是当前遍历对象的值,可以用this代替
标签:
原文地址:http://www.cnblogs.com/fj0716/p/4764448.html