摘要:
/**call的参数是一个对象的实例call的参数是一个函数,即一个对象创建一个基类对象作为子类原型的原型共享基类prototype的方法为函数动态地增加属性、方法为函数prototype的属性添加方法*/this.name="window";functionClass1(){this.name="class1";//设置对象名----若Call调用后在给实例化对象赋值!!this.showTxt=function(){alert(this.name)}}Class1.prototype.say=function(){alert(this.name);} 阅读全文
posted @ 2012-03-01 13:53 枫雨 阅读(1681) 评论(0) 推荐(0)
浙公网安备 33010602011771号