2 qq 36203048 qq_36203048 于 2017.09.14 17:15 提问

新手求解 javacript库代码删除sharepoint文件夹 找不到文件
     function deleteFolder(siteUrl) {
        var clientContext = new SP.ClientContext(siteUrl);
        oWebsite = clientContext.get_web();
        clientContext.load(oWebsite);
        clientContext.executeQueryAsync(function () {
            folderUrl = oWebsite.get_serverRelativeUrl() + "/Lists/Shared Documents/Folder1";
            folderToDelete = oWebsite.getFolderByServerRelativeUrl(folderUrl);
            folderToDelete.deleteObject();
            clientContext.executeQueryAsync(
                Function.createDelegate(this, successHandler),
                Function.createDelegate(this, errorHandler)
            );
        }, errorHandler);
        function successHandler() {
            alert("Go to the " +
                "<a href='../Lists/Shared Documents'>document library</a> " +
                "to make sure the folder is no longer there.");
        }
        function errorHandler() {
           alert("Request failed: " + arguments[1].get_message());
        }
    }

图片说明
图片说明
图片说明

1个回答

playboyanta123
playboyanta123   2017.09.14 17:38

没看明白什么意思,帮不了忙

qq_36203048
qq_36203048 就是 ,我需要做一个删除文件夹的操作 , 文件夹是存在的,它却提示说找不到文件夹 ,不知是什么问题
2 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片