摘要: 实现继承主要是依靠原型链来实现的 1、原型链 基本思想就是利用原型让一个引用类型继承另一个引用类型的属性和方法 1 function Parent(){ 2 this.surname = "li"; 3 } 4 Parent.prototype.getSurname = function(){ 5 阅读全文
posted @ 2016-09-08 15:28 慵懒的小猪 阅读(143) 评论(0) 推荐(0)