0
我剛開始學習Sharepoint2013,從開發一個功能開始,包括一個名爲testElement的元素,例如應該將按鈕顯示爲功能區並運行腳本以啓用或禁用此功能區。 的XMLof元素看起來是這樣的:Sharepoint中的Javascript參考13
>
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="RibAct" Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Documents.Copies.Controls._children">
<Button Id="RibButton"
Command="Command"
Sequence="15" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="CommHandler"
CommandAction="javascript:javascriptFunction();"
EnabledScript="javascript:enable();"/>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
<CustomAction Id="Ribbon.Library.Actions.Scripts"
Location="ScriptLink"
ScriptSrc="/_layouts/ApplicationPageFolder/Custom.js" />
</Elements>
我的使能功能位於Custom.js,部署功能後,我可以激活並在我的網站停用它,我可以看到功能區在正確的位置,但仍然未啓用,出現啓用功能尚未找到的錯誤。 有人可以告訴我這裏有什麼問題嗎?