function Peopleobj(){ Peopleobj.prototype.name = "牛魔王"; Peopleobj.prototype.weapon = "芭蕉扇"; Peopleobj.prototype.run = function(){ return this.name + '的武器:' + this.weapon } } var m1 = new Peopleobj(); var m2 = new Peopleobj(); var m3 = new Peopleobj(); console.log(m1.run() + ',' + m2.run()) console.log(m1.run == m2.run)