var obj = new Object(); obj.Name = "22"; obj.Age = 12; obj.sayHello = function () { alert("Hello"); }; //获取对象所有成员 for (var e in obj) { alert(e); }