var person = function(name){
this.name = name;
}
person.prototype = {
empty: function(value){
return !!value;
},
isName: function(){
return this.empty(this.name);
},
methods: {
say: function(){
return 'My name is ' + this.name;
}
}
};
var Person = new person('Sanonz');
alert(Person.methods.isName());
//执行这个报错,怎么才能在say方法中访问this.name?
怎么才能在say方法中访问this.name?
Person.methods.say.call(Person)