var a= new function(){
this.a=1;
this.b=2;
this.c=3;
}
alert(a.a);//1
function b(){
this.a=1;
this.b=2;
this.c=3;
}
alert(b.a);//undefined
var c=new b();
alert(c.a);//1
var d=function(){
this.a=1;
this.b=2;
this.c=3;
}
alert(d.a);//undefined
为啥是这样的呀?
相关分类