猿问
如何用$.each()遍历json
如何用$.each()遍历json,具体语法是什么
绿野仙踪yy
浏览 1790
回答 2
2回答
侠客岛的含笑
var json = [ {"id":"1","tagName":"apple"}, {"id":"2","tagName":"orange"}, {"id":"3","tagName":"banana"}, {"id":"4","tagName":"watermelon"}, {"id":"5","tagName":"pineapple"}];$.each(json, function(idx, obj) { alert(obj.tagName);});
1
0
0
绿野仙踪yy
谢谢!
0
0
0
随时随地看视频
慕课网APP
相关分类
JavaScript
我要回答