案例:
function Person(id,name,age){ this.id = id; this.name = name; this.age = age; } var person1 = new Person(‘B11031020‘,‘王延朋‘,23); var person2 = new Person(‘B11031021‘,‘王鹏‘,23);
JavaScript工厂模式
原文:https://www.cnblogs.com/pecool/p/10822503.html