共用方式為


SPUserCustomAction.ScriptSrc Property

Gets or sets the URL to a file that contains JavaScript to be executed when the custom action is performed.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallablePropertyAttribute> _
<ClientCallableConstraintAttribute(FixedId := "validUrl", Type := ClientCallableConstraintType.Custom,  _
    Value := "It MUST be a server-relative url.")> _
Public Overridable Property ScriptSrc As String
    Get
    Set
'Usage
Dim instance As SPUserCustomAction
Dim value As String

value = instance.ScriptSrc

instance.ScriptSrc = value
[ClientCallablePropertyAttribute]
[ClientCallableConstraintAttribute(FixedId = "validUrl", Type = ClientCallableConstraintType.Custom, Value = "It MUST be a server-relative url.")]
public virtual string ScriptSrc { get; set; }

Property Value

Type: System.String
The path to a script file.

See Also

Reference

SPUserCustomAction Class

SPUserCustomAction Members

Microsoft.SharePoint Namespace

ScriptBlock