document Members

The following tables list the members exposed by the document type.

Public Properties

Name Description
VSObject_Properties

anchors

Returns an array of all the anchors in the current document.

VSObject_Properties

applets

Returns an array of all the applets in the current document.

VSObject_Properties

embeds

Returns an array of all the embed objects in the current document.

VSObject_Properties

filename

Retrieves the file name of the current document, including the full path from the site root, and the file name extension.

VSObject_Properties

forms

Returns an array of all the forms in the current document.

VSObject_Properties

frames

Returns an array of all the frames in the current document.

VSObject_Properties

htmlElement

Exposes the most common properties of valid HTML elements in an HTML document.

VSObject_Properties

images

Returns an array of all the images in the current document.

VSObject_Properties

isXhtml

Retrieves the XHTML status of the document.

VSObject_Properties

links

Returns an array of all the links in the current document.

VSObject_Properties

location

Returns the absolute file path of the document from the drive root, as in the following example.

file:///C:\Users\UserName\Documents\My Web Sites\Example Site\example-file.html

VSObject_Properties

name

Retrieves the file name of the document, including the file name extension.

VSObject_Properties

pathFromSiteRoot

Retrieves the path of the current document, not including the document name.

VSObject_Properties

scripts

Returns an array of all the scripts in the current document.

VSObject_Properties

selection

Indicates the code within a document that has been selected.

Public Methods

Name Description
VSObject_Method

appendScriptReference

Appends a <script> tag reference to the bottom of the head.

VSObject_Method

appendStyleReference

Appends a style sheet reference to the bottom of the head. If the exact reference exists, the function will not add a new reference.

VSObject_Method

close

Closes the document associated with a DOM.

VSObject_Method

getElementById

Returns the element that has the specified ID.

VSObject_Method

getElementsByAttributeName

Returns an array of objects that have the specified attribute attributeName.

VSObject_Method

getElementsByTagName

Returns an array of all the elements that contain the tag specified by tagName.

VSObject_Method

getScriptElementByCode

Searches the content of <script> tags and returns an htmlElement object that contains the specified code string.

VSObject_Method

getScriptElementByFile

Returns the element that has a <script> tag that contains the specified fileNamePattern.

VSObject_Method

getStyleElementByCode

Searches the content of <script> tags and returns an htmlElement object that contains the specified code string.

VSObject_Method

getStyleElementByFile

Searches the content of <style> tags and returns the htmlElement object that contains the specified code string.

VSObject_Method

insertBeforeHtml

Inserts a string before the <html> tag of the document.

VSObject_Method

save

Saves the file associated with a DOM.

VSObject_Method

saveAs

Opens the Save As dialog box to save the file associated with xweb.document.

VSObject_Method

synchronizeViews

Synchronizes the Microsoft Expression Web Design and Code views.

See Also

Concepts

document
xweb

  Copyright © 2011 by Microsoft Corporation. All rights reserved.