JavaScript面向对象编程
//类的定义 //方法一:类的一般定义方法 functionplayer1(_name) { this.name=_name; this.say=function(){alert(this.name);}; } varp1=newplayer1("llinzzi1"); p1.say(); //方法二:prototype定义方法 varplayer2=function(){} player2.prototype={ name:"", say:functi...