摘要:
绑定构造函数在子类构造函数中使用Fatherconstructor.apply(this, arguments)eg://父类function People(name,age){ this.name = name; this.age = age; this.species = "h... 阅读全文
摘要:
浅拷贝浅拷贝函数:function copy(p){ var c = {}; for (var i in p){ c[i] = p[i]; } c.uber = p; return c;}测试:var People = { nation:'中国'};Pe... 阅读全文