<html>
<head>
<script>
window.onload=function(){
var items= [
{name: 'Tony',
age: 54
},
{ name: 'Yuk',
age: 52
},
{name: 'Jamo',
age: 65
}
];
var item=new Array();
for(var key in items){
item.push(items[key]['name']);
}
alert(item);
}
</script>
</head>
<body>
</body>
</html>
来源:oschina
链接:https://my.oschina.net/u/1434721/blog/299667