几种js设计模式

1. 工厂模式 做用:实现对象的批量建立javascript /* 构造函数 */ function Person(name) { this.name = name; } function Car(model) { this.model = model; } /* 建立 */ function create(type, val) { return (this instanceof cr
相关文章
相关标签/搜索