function Objecte(name){
this.name=name;
}
Objecte.prototype.look=function(){
return function(){
alert(this.name);
};
}
我正在尝试访问对象的属性,但是当我调用该函数时,它会发出未定义的警报。
extintor = new Objecte("extintor");
$(document).on('dblclick',"#extintor",extintor.look());