var a={
A:function()
{
var a=function(txt)
{
this.text=txt;
alert(this.text);
};
a.prototype={
show:function(){alert(this.text);}
}
return a;
}();
}
var b=new a.A("Do you miss me?");
b.show();
以上脚本有错吗,为什么不弹啊?
问题补充: 怎么输的代码丢失啊,我重新输一遍 A:function() { var a=function(txt) { this.text=txt; }; a.prototype={ show:function(){alert(this.text);} } return a; }(); } var b=new a.A("Do you miss me?"); b.show();
翻翻过去那场雪
相关分类