qq_36203048
讲完这题就下课
2017-09-13 02:42

新手 求解答 SharePoint文档库中创建文件夹

  • sharepoint
    function createFolder() {
        var clientContext = new SP.ClientContext.get_current();
        oWebsite = clientContext.get_web();
        oList = oWebsite.document().getByTitle("Shared Documents");
        var itemCreateInfo = new SP.ListItemCreationInformation();
        itemCreateInfo.set_underlyingObjectType(SP.FileSystemObjectType.folder);
        itemCreateInfo.set_leafName("My new folder!");
        oListItem = oList.addItem(itemCreateInfo);
        oListItem.set_item("Title", "My new folder!");
        oListItem.update();
        clientContext.load(oListItem);
        clientContext.executeQueryAsync(successHandler, errorHandler);
    }
    function successHandler() {
        alert("Go to the " +
            "<a href='../Lists/Shared Documents'>document library</a> " +
            "to see your new folder.");
    }
    function errorHandler() {
        alert("Request failed: " + arguments[1].get_message());          
    }

图片说明
图片说明
想知道Shared Documents表示的是什么,这个demo也是教程上的代码,为什么说找不到

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答