function Person(name,sex){? this.name=name;? this.sex=sex;? this.introduce=function(){?? ?alert("Myname is:"+this.name);? }}Person.run=function(){? alert(this.name+"love run");}Person.prototype.eat=function(){??? alert(this.name+"like eat");}var p1=new Person("aa","nan");alert(p1.introduce());會(huì)彈出兩個(gè)框框第一次彈出:Myname is:aa 第二次彈出 undefined我想知道這個(gè)undefined是怎么回事?
為什么會(huì)出來一個(gè)undefined
村小小鬧
2015-01-29 11:47:14