var A = function(name){ this.name=name;}A.prototype = { sayName:function(){ alert(this.name); }}var B = function(age){ this.age = age;}B.prototype = { sayAge : function(){ alert(this.age) } }//function C(){};var c = new C("white",25);c.sayName();c.sayAge();
添加回答
举报
0/150
提交
取消