var DomesticChinaDeal = function(){};
DomesticChinaDeal.prototype = {
test: function() {
alert("Hello World");
}
};
DomesticChinaDeal.prototype.constructor = DomesticChinaDeal;
var Factory = function(){};
Factory.prototype = {
getDeal : function() {
return new DomesticChinaDeal();
}
};
Factory.prototype.constructor = Factory;
var deal = new Factory().getDeal();
deal.test();
390

被折叠的 条评论
为什么被折叠?



