function Car(color){
this.color = color;
this.run = function(){document.write("车开了<br/>");};
}
function Bus(color, owner){
//获取指向Car的指针
this.newMethod = Car;
this.newMethod(color);
//删除指针
delete this.newMethod;
//定义新方法/属性
this.owner = function(){document.write("这是属于" + owner + "的车<br/>");};
}
var car = new Car("红色");
var bus = new Bus("黄色", "老板");
car.run();
bus.owner();
document.write("这车的颜色是:" + bus.color + "<br/>");
bus.run();
有趣的是对象冒充可以支持多继承,在函数休内定义多个指向不同类的属性则可