var Person = (function(){
  var Constr;
  Constr = function(){
    this.name = 'carl';
  }
  Constr.prototype = {
    constructor : Constr,
    getName : function(){
    return this.name;
  }
}
  return Constr;
}())
var obj = new Person();
console.log(obj.getName());  //输出:carl

04-14 06:37