emp=new MakeArray(3)
emp[1]=new Employee(1,"Casey Jones", "Engineering")
emp[2]=new Employee(2,"Phil Lesh", "Music")
emp[3]=new Employee(3,"August",""Admin)
这时,利用函数show_props(在JavaScript Object Model中定义)来显示该 数组中的对象, 如下:
for (var n=1; n<=3; n++) {
document.write(show_props(emp[n],"emp")+"");
}
您可能感兴趣的文章: