在js中定義對象:
方式一:
var obj = {};
obj['a']=1;
obj['b']=2;
方式二:
var obj=new Object();
obj.a=1;
obj.b=2;
在js中定義集合:
var list = [];
list.push(obj);