摘要: http://www.cnblogs.com/tiwlin/archive/2009/08/06/1540161.html 阅读全文
posted @ 2013-04-15 17:41 小毛驴 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 4.混合的构造函数/原型方式function Car(sColor, iDoors, iMpg) { this.color = sColor; this.doors = iDoors; this.mpg = iMpg; this.drivers = new Array("Mike", "Sue");}Car.prototype.showColor = function () { alert(this.color);};var oCar1 = new Car("red", 4, 23);var oCar2 = new Car(" 阅读全文
posted @ 2013-04-15 17:22 小毛驴 阅读(116) 评论(0) 推荐(0) 编辑