摘要: //js面相对象编程//定义constructor构造方法function myFn(name,sex){ this.name = name; this.sex = sex;}//用prototype追加属性方法myFn.prototype.getName = function(inte... 阅读全文
posted @ 2015-12-27 18:34 觉信 阅读(197) 评论(0) 推荐(0)
摘要: //父类function Aaa(name,sex,inter){ this.name = name; this.sex = sex; this.inter = [1,2,3];}Aaa.prototype.showName = function(name){ ret... 阅读全文
posted @ 2015-12-27 18:23 觉信 阅读(213) 评论(0) 推荐(0)