`

遍历JSON中的属性

 
阅读更多

遍历JSON里面的属性,输出------------属性名+属性值

 
var result = {"a":1,"b":2,"c":3}
for ( var item in result) {
                alert("result中" + item + "的值=" + result[item]);
            }

 输出------------result中a的值=1  ....

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics