假设我有一个功能:
function test(){} test.prototype.method01=function(){ //do something } test.prototype.method02=function(){ //how can I call the method01? //this.method01()...? //but the chrome through an error: //Uncaught TypeError: Object #<HTMLImageElement> has no method 'method01' }
编辑:
其实method01就像这样:
test.prototype.method02=function(){ $('.cpy').resizable({ }).draggable({ start:function(e,ui){ this.method01(); } }); }