Javascript using contructor inside in Array
This question already has an answer here:
here is a JsFiddle
is that what you need ?
for (var key in family) {
var obj = family[key];
for (var prop in obj) {
alert(prop + " = " + obj[prop]);
}
}
Here is the way to access the properties directly and not with a loop jsFIddle (Method 2, uncomment)
链接地址: http://www.djcxy.com/p/24536.html