标签:
var object = {
isA : function(aType) {
var self = this;
while(self){
if(self == aType)
return true;
self = self.Type;
};
return false;
}
};
function Class(aBaseClass,aDefineClass) {
function class_() {
this.Type = aBaseClass;
for(var menber in aDefineClass)
this[member] = aDefineClass[member];
};
class_.prototype = aBaseClass;
return new class_();
};
function New(aClass,aParams) {
function new_(){
this.Type = aClass;
if(aClass.Create)
aClass.apply(this,aParams);
};
new_.prototype = aClass;
return new new_();
};
};
201506011015_《JavaScript语法甘露——用于实现最基础的方法》
标签:
原文地址:http://www.cnblogs.com/beesky520/p/4543392.html