编程基础设计模式构造函数模式构造函数模式 function People(name){ this.name = name;}people.prototype.say = function(){ alert(this.name);}var xiaoming = new People();xiaoming.say();