$(function() {
var arr1 = {"d":"one", //JSON
"u":"two",
"a":"three",
"n":"four",
"b":"five"
};
var arr2 = ["one", "two", "three", "four", "five"]; //数组
var w="w", var e="e", //对象
var arr3={};
arr3.w=w,
arr3.e=e;
var text = "";
jQuery.each(arr, function(i, val) {
text = text + i + ":" + val+" ";
});
alert(text);
});
Jquery遍历集合 对象 Json
最新推荐文章于 2023-04-04 12:00:03 发布