奇妙的Function和prototype
摘要:
先来看一段代码function fn() {};Function.prototype.test = 'fn';fn.prototype.test = 'aaa';var fo = new fn();alert(fo.test);相信所有人都知道答案,ok,再来一段:function fn() { return {}; };Function.prototype.test = 'fn';fn.prot... 阅读全文
posted @ 2010-02-22 09:55 nozer0 阅读(587) 评论(0) 推荐(0) 编辑