1
$ .Comment = function(){ this.alertme =「Alert!」; }
$.Comment.prototype.send = function() {
var self = this;
$.post(
self.url,
{
'somedata' : self.somedata
},
function(data, self) {
self.callback(data);
}
);
}
$.Comment.prototype.callback = function(data) {
alert(this.alertme);
}
當我調用$ .Comment.send()調試器說,我認爲self.callback(data) is not a function
我在做什麼錯?
謝謝