scripts Property

Microsoft FrontPage Visual Basic

scripts Property

Returns an IHTMLElementCollection collection object that represents the collection of all SCRIPT elements in a Web page.

expression.scripts

expression    Required. An expression that returns one of the objects in the Applies to list.

Remarks

You can return the individual FPHTMLScriptElement or IHTMLScriptElement objects by using the Item method and the element identifier, as indicated in the id attribute. If there are SCRIPT elements with duplicate id attribute values, a collection of the SCRIPT elements with the same id attribute values is returned. Collections of SCRIPT elements with the same id attribute values must be referenced by ordinal position.

Example

The following example sets the language property for the first SCRIPT element in the active document. This example assumes there is at least one SCRIPT element in the active document.

    Dim objScript As FPHTMLScriptElement

Set objScript = ActiveDocument.Scripts.Item(0)
objScript.Language = "javascript"