//采用call方式实现js继承
function A(color ) {
this.Acolor = 색상;
this.AshowColor = function() {
document.writeln("Acolor: " this.Acolor);
}
}
function B(색상, 이름) {
A.call(this, 색상);
this.Bname = 이름;
this.BshowName = function() {
document.writeln("B이름: " this.Bname);
}
}
var objA = new A("red");
objA.AshowColor();
document.writeln("----------------");
var objB = new B("검은색", "데모");
objB.AshowColor();
objB.BshowName();
document.writeln("----------------");