摘要:
http://www.cnblogs.com/tiwlin/archive/2009/08/06/1540161.html 阅读全文
摘要:
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(" 阅读全文