$.each(json,function(index,item){ }); jquery遍历

http://zhidao.baidu.com/link?url=qH_olwV7VLCvEW3MWAhq5nYW4H3MbU1eiWwHkxmUtfFXBgNxOQT6ykqzJw33vAMXSWt-1m64IuQLYzTOagBkVslM68B9Hx-NDYRGw8qh9OO
http://zhidao.baidu.com/question/918613994092963379.html?qbl=relate_question_0&word=%24.each%28%2C%20function%28%2C%20%29
http://www.cnblogs.com/cdemo/p/4142695.html




$.each(json,function(index,item)

里面的index代表当前循环到第几个索引,
item表示遍历后的当前对象,
比如json数据为:
[{"name":"a"},{"name":"b"},{"name":"c"}]
使用foreach遍历后,
index,item 依次为,
0,{"name":"a"}
1,{"name":"b"}
2,{"name":"c"}




    
        
        jquery遍历
        
    
    
        
    



你可能感兴趣的:($.each(json,function(index,item){ }); jquery遍历)