Function.prototype.method = function(name, func) {
this.prototype[name] = func;
return this;
}
function f1() {
}
f1.method("a", function(k) { alert(k+" "+this.b) }).method("b", "hello");
new f1().a(1);
Function 的 prototype
最新推荐文章于 2021-09-13 15:33:51 发布