摘要: 继承(原型链) a-->b-->c 1、扩展原型对象往原型对象中添加新属性,实例也可以共享,Person.prototype.say=function(){}; 2、替换原型对象把默认的原型对象替换掉,Person.prototype={constructor:Person,p1:function( 阅读全文
posted @ 2016-09-26 23:50 程序猿1990 阅读(182) 评论(0) 推荐(0) 编辑
摘要: function HotTag(parent){ //自动执行初始化(xxx,xxx) this.init(parent);//this >remen remen.init() //remen >remen.__proto__(HotTag.prototype) //return this;}//初 阅读全文
posted @ 2016-09-26 00:09 程序猿1990 阅读(583) 评论(0) 推荐(0) 编辑