摘要: 引用 李松峰 老师的PPT 1 var Person = function(living, age, gender) { 2 this.living = living; 3 this.age = age; 4 this.gender = gender; 5 }; 6 7 Person.prototype.getGender = function(){ 8 return this.gender; 9 };10 11 var child = new Person(true, 25, 'male');12 13 console.log (child.getGender()); ... 阅读全文
posted @ 2013-03-08 13:37 小猩猩君 阅读(240) 评论(0) 推荐(0) 编辑