我有一个像这样的javascript基本函数;
roomBase = function () {
this.go = function(){
alert(1);
}
}
我有一个像这样的房间物体;
myRoom = function(){
this.go = function(){
alert(456);
}
}
myRoom.prototype = new roomBase();
theRoom = new myRoom();
当我打电话theRoom.go()时,我收到了来自prototype. 我想要的是来自myRoom函数的警报。