2014年3月21日
摘要: 一、基于prototype原型function Person(name){ this.name = name;}Person.prototype.eat="food";function Student(name,eat){ Person.apply(this, arguments);}Student.prototype = new Person();var s1 = new Student("王大", "food");console.log(s1.name);console.log(s1.eat);View Code1、证明proto 阅读全文
posted @ 2014-03-21 11:26 jian_xie 阅读(130) 评论(0) 推荐(0) 编辑