function A()
{
this.abc
= '111';
}
A.prototype
.show = function()
{
alert(this.abc
);
}
function B()
{
A.call(this);
}
for(var i
in A.prototype
)
{
B.prototype
[i
] = A.prototype
[i
];
}
B.prototype
.fn = function()
{
alert('qwe');
}
var obj
= new B();
obj
.show();
var objA
= new A();
objA
.fn();
转载请注明原文地址: https://lol.8miu.com/read-9925.html