JavaScript中遍历一个对象的属性,在控制台输出
var object = { a:10; b:20; s:'hello' }; $.each(object, function(name, value) { console.log(name+':'+value); });
JavaScript中遍历一个对象的属性,在控制台输出
var object = { a:10; b:20; s:'hello' }; $.each(object, function(name, value) { console.log(name+':'+value); });