·实例1(各个分类继承BaseDB)
var KeyValueDB = function(_param
) {
BaseDB
.apply(this, [_param
]);
}
var BaseDB = function(_param
) {
this.param
= _param
;
this.db
= null;
this.compName
= 'db<' + this.param
.databaseName
+ '>':
...
}
function inherit(subClass
, superClass
) {
var Temp
= new Function();
Temp
.prototype
= superClass
.protype
;
subClass
.prototype
= new Temp();
}
转载请注明原文地址:https://blackberry.8miu.com/read-7306.html