摘要: 1 function Car(model, year, miles) { 2 this.model = model; 3 this.year = year; 4 this.miles = miles; 5 } 6 7 Car.prototype.toString = function() { 8 return this.model + " has done " + this.miles + " miles"; 9 };10 11 var civic = new Car("Honda Civic", 2009, 20000);12 va 阅读全文
posted @ 2014-02-08 16:10 小猩猩君 阅读(241) 评论(0) 推荐(0) 编辑