设计模式 

一种JavaScript的设计模式

//简单的类的设计模式 //定义一个类class1 function class1() {   //构造函数 } //通过指定prototype对象来实现类的成员定义 class1.prototype = {   someproperty:"simple",   somemethod:function {     //方法代码   },   //其实属性和方法 }在一个类的成员之间互相引用,必须通过this指针...