function person(name){ this.name=name; //构造函数内的属性 this.show=show; } function show(){ alert("Hello :"+this.name); } person.author="OBJECT"; person.poem="Everything has its object, things are empty..."; person.Sing=function(){ alert(person.author+" -> "+person.poem); } person.prototype=person //在此演化 person.prototype.marry=function(){ alert(this.name+" have married") } var p=new person("张三"); p.Sing(); p.marry(); // 结婚了