私が次のものを持っていると仮定します:
var object = {
myfunc: function() {
$.ajax({
url: url,
format: format,
success: function() {
console.log(this) // This refers to the ajax call and not "object"
$.ajax({
url: url,
format: format,
success: function() {
console.log(this) // this refers to nested ajax call and not "object"
}
});
}
});
}
}
ajax呼び出しとは対照的に、「オブジェクト」を参照するために「これ」を取得する方法は?