摘要: 初识js的继承机制,整理一下,以备日后复习和查阅。 1 对象冒充function classA(color){ this.color=color; this.sayColor=function (){ alert("A:"+this.color); };}function classB(color,name){ this.newMethod=classA; this.newMethod(color); delete this.newMethod; this.name=name; this.sayName=function(){ alert("B:"+th 阅读全文
posted @ 2013-03-21 18:03 猫九九 阅读(96) 评论(0) 推荐(0) 编辑