Person.prototype={
play:function() {
alert("Person show");
},
init:function() {
alert("Person init");
}
};
function test(){
var s=new Person();
s.init();
s.play();
}
转载于:https://my.oschina.net/minbin/blog/360969