摘要: //JavaScript完美甘露模型代码 function Class() { var aDefine = arguments[arguments.length-1]; if(!aDefine) return; //解析基类 var aBase = arguments.length > 1?arguments[0]:object; //临时函数,用于挂接原型链 function prototy... 阅读全文
posted @ 2015-06-01 15:26 Coca-code 阅读(238) 评论(0) 推荐(0)
摘要: var object = { isA : function(aType) { var self = this; while(self){ if(self == aType) return true; self = self.Type; }; ... 阅读全文
posted @ 2015-06-01 10:34 Coca-code 阅读(223) 评论(0) 推荐(0)
摘要: function New(oClass,oParams) { function new_(){ oClass.Create.apply(this,oParams); }; new_.prototype = aClass; return new new_();};=====... 阅读全文
posted @ 2015-06-01 10:11 Coca-code 阅读(124) 评论(0) 推荐(0)