Wednesday, April 18, 2007

無名配列 Anonymous Arrayの例 Javascript

var persons = [
{ Name: "田中", Age: 20 },
{ Name: "山田", Age: 18 },
{ Name: "青木", Age: 15 }
];

for (var i = 0; i < persons.length; i ++) {
   alert(persons[i].Name + ":" +persons[i].Age);
}

No comments: