javascript模拟c#类
摘要:
Function.prototype.method = function (method, fn) { this.prototype[method] = fn }; function regClass(opt) { for (var x in opt) { if (typeof (opt[x]) != "function") { this[x] = opt[x]; } regClass.method("get" + x, function () { return opt[x]; }) regClass.method("set" + x 阅读全文
posted @ 2013-05-18 17:28 Thomas Guan 阅读(130) 评论(0) 推荐(0)
浙公网安备 33010602011771号