gpt4 book ai didi

javascript - 从同一个js对象下的另一个方法调用一个方法

转载 作者:行者123 更新时间:2023-11-30 07:27:36 25 4
gpt4 key购买 nike

<分区>

我写了一些js:

var folersTreeMgr = {

sendDeleteFolderRequestAndUpdateFoldersTree: function () {
...

} else {
createAjaxRequest("Manager/DeleteLocation", {
'locationId': folder_minimal_descriptor.locationId
}).done(function (isSucceeded) {

if (isSucceeded) {

folersTreeMgr.deleteFolderInFoldersTree(); // works
this.deleteFolderInFoldersTree(); // doesn't work
deleteFolderInFoldersTree(); // doesn't work
}

//TODO: else: error
});
}
},


deleteFolderInFoldersTree: function () {
$("#jstree").jstree("remove", null);
}
};

为什么会出现“缺少函数”错误

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com