1.var per = new Object();
或
2.ar obj = {};
3.var obj = {username:"allen", password:"123"};
以上3种方式均可定义JavaScript对象(obj)
per.name = 'zhangsan'; per.age = 30; 或者 per["name"] = 'zhangsan'; per["age "] = '30';