2018年的文章移至github上,点我去!2018年的文章移至github上,点我去!2018年的文章移至github上,点我去!

Fork me on GitHub

2016年5月18日

JavaScript的继承实现方式

摘要: 1.使用call或apply方法,将父对象的构造函数绑定在子对象上 function A(){ this.name = 'json'; } function B(){ A.call(this); } //测试 var testB = new B(); alert(testB.name) //->js 阅读全文

posted @ 2016-05-18 17:35 qize 阅读(343) 评论(0) 推荐(0)

导航