Share via


DesignerDocument.getScript Method

SharePoint Designer Developer Reference

Returns a String that represents the script for an event for a specified element.

Syntax

expression.getScript(element, event, index)

expression   Required. A variable that represents a DesignerDocument object.

Parameters

Name Required/Optional Data Type Description
element Required IHTMLElement Specifies the element that contains the script.
event Required String Specifies the name of the event that causes the script to run.
index Required Long Specifies the script item if an event specifies more than one script to run when the event occurs. Multiple scripts are one-based rather than zero-based; therefore the index for the first script (in the case of multiple scripts) or the only script (in the case of a single script) for an event is "1".

Return Value
String

Remarks

Use the addScript method to add a script to an element.

See Also