摘要:
//模拟类式继承//Douglas CrockfordFunction.prototype.method = function(name,func) { this.prototype[name] = func; return this;};Function.method('inherits', function(parent) { var depth = 0; var proto = this.prototype = new parent(); this.method('uber', function uber(name)) { var func; ... 阅读全文