2009年6月30日
摘要: 1.使用call方法实现[代码]但是当我们给Person 加一个prototype方法时,就继承不了了。Person.prototype.say=function(){alert("Hello , I'm "+this.name );}2.只有建一个基类的对象作为子类原型的原型:[代码]3.现在把Person.call(this,name);去掉。。[代码]Person.call(this,nam... 阅读全文
posted @ 2009-06-30 11:02 将军 阅读(226) 评论(0) 推荐(0) 编辑