摘要: JavaScript is a class-less language, however classes can be simulated using functions.eg:// A car 'class'function Car(model) { this.model = model; this.color = 'silver'; this.year = '2012'; this.getInfo = function () { return this.model + ' ' + this.year; }}We can the 阅读全文
posted @ 2013-09-01 16:34 Master HaKu 阅读(367) 评论(0) 推荐(0) 编辑