//第一种
function Demo(){
var obj=new Object();
obj.name="Yubaba";
obj.age=12;
obj.firstF=function(){
}
obj.secondF=function(){
}
return obj;
} var one=Demo();
// 调用输出
document.write(one.age);
//第二种
function Demo(){
this.name="Yubaba";
this.age=12;
this.firstF=function(){
}
this.secondF=function(){
}
} var one=new Demo // 调用输出
document.write(one.age);