我已經使用了 「sp.js」 訪問SharePoint ClientContext在SharePoint 2010和2013年的webpart。我想在Office 365加載項中使用SP ClientContext。在Office 365使用SP.js的SharePoint外接
我已經使用的代碼,
ExecuteOrDelayUntilScriptLoaded(function() {
var context = new SP.ClientContext.get_current();
}, "sp.js");
它無法加載「sp.js」文件,當我在辦公室365的SharePoint插件嘗試過。如何解決這個問題?什麼是使用Office 365中的SharePoint外接「sp.js」文件的方式?
編輯:我創建了SharePoint中加載項。
編輯:2我在VisualStudio 2015中創建了一個新的SharePoint加載項目,它有html代碼。所以,我不能在我的頁面中使用下面的代碼,
<SharePoint:ScriptLink ID="ScriptLink1" name="SP.js" runat="server"
ondemand="false" localizable="false" loadafterui="true" />
我創建了SharePoint中加載項。我在我的問題中更新了它。 –