readOnly
Properties Reference

readOnly

Description

Indicates whether the style sheet can be modified. If a style sheet is obtained through a LINK or an Import tag, the style sheet cannot be modified. The default value is FALSE (cannot be modified).

Syntax

object.readOnly

Remarks

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

styleSheet


readOnly

Description

Causes the element's contents to be read-only, meaning that the user cannot enter or edit text in the control.

Syntax

object.readOnly[ = readOnly]

Remarks

This is different than disabled. Read-only still allows the element to receive the focus, while disabled does not.

The default value for this property is FALSE.

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

INPUT (text and password types only), TEXTAREA


readyState

Description

Specifies the current state of an object being downloaded.

Syntax

object.readyState

Settings

Possible values include:
uninitialized The object is not initialized with data.
loading The object is currently loading its data.
interactive The object can be interacted with even though it is not fully loaded.
complete The control is completely loaded.

Remarks

Each object can independently determine which of the four states it exposes.

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

IMG, LINK, OBJECT, SCRIPT, STYLE, document

See Also

onreadystatechange


reason

Description

Indicates the disposition of data transfer for a data source object.

Syntax

object.reason

Settings

This read-only property is an integer value specifying the reason for completion. It can be one of these values:

0 Data transmitted successfully.
1 Data transfer aborted.
2 Data transfer in error.

Applies To

event


recordNumber

Description

Specifies the ordinal record from the data set that generated the element. Applies to a bound, repeated table.

Syntax

object.recordNumber

Remarks

This property can be used in conjunction with the ADO recordset available from every data source object through the object's recordset property.

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BGSOUND, BIG, BLOCKQUOTE, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, INS, KBD, LABEL, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, Hidden


recordset

Description

Returns the recordset if the object is a data provider.

Syntax

object.recordset

Remarks

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

OBJECT


referrer

Description

Specifies the URL of the previous location.

Syntax

object.referrer

Remarks

This is only true when the current page has been reached through a link from the previous page. Otherwise, document.referrer will return empty; it will also return empty when the link is from a secure site.

For example, if PageA.htm has a link to PageB.htm, and the user clicks the link on PageA.htm to go to PageB.htm, the document.referrer on PageB.htm will return "PageA.htm". However, if the user is on PageA.htm and types PageB.htm into the address line, or uses Open in the File menu to get to PageB.htm, the document.referrer will return empty.

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

document


rel

Description

Specifies the relationship(s) described by the hypertext link from the anchor to the target.

Syntax

object.rel[ = rel]

Remarks

The value is a comma-separated list of relationship values. Values and their semantics will be registered by the HTML registration authority. The default relationship, if none other is given, is void. The rel property is used only when the href property is present.

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

A, LINK


returnValue

Description

Specifies the return value from the modal dialog window.

This property applies only to windows created using the showModalDialog method.

Syntax

object.returnValue[ = Variant]

Applies To

window


returnValue

Description

Specifies the return value from the event.

Syntax

object.returnValue[ = Boolean]

Settings

This read-write property can be either TRUE or FALSE. Setting it to FALSE cancels the default action of the source element of the event.

The value of this property takes precedence over values returned by the function, such as through a return statement.

Applies To

event


rev

Description

Same as the rel property, but the semantics of the link type are in the reverse direction. A link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". An anchor can have both rel and rev properties.

Syntax

object.rev[ = rev]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

A, LINK


rightMargin

Description

Specifies the right margin for the entire body of the page, and overrides the default margin.

Syntax

object.rightMargin[ = rightMargin]

Settings

This read-write property takes a string value. If set to an empty string (""), the right margin will be exactly on the right edge.

Applies To

BODY


rowIndex

Description

Indicates the element's position in the rows collection that is for the TABLE. This is different from sectionRowIndex, which indicates the element's position in the TBODY, THEAD, or TFOOT rows collection. These sections are mutually exclusive, so the TR is always contained in one of these sections, as well as the TABLE. Collection indexes are in source order of the HTML document.

Syntax

object.rowIndex[ = element]

Return Value

This property has read-only permission.

Applies To

TR

See Also

sectionRowIndex, sourceIndex, cellIndex


rows

Description

Specifies the number of rows tall the text area control should be.

Syntax

object.rows[ = rows]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

TEXTAREA


rows

Description

Specifies a comma-delimited list of frames to create. Each item in the list contains the initial size of the row.

Syntax

object.rows[ = rows]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

FRAMESET


rowSpan

Description

Specifies how many rows in a TABLE this cell should span. This property can only be changed after the page has been loaded.

Syntax

object.rowSpan[ = rowSpan]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

TD, TH


rules

Description

Specifies which dividing lines are displayed (inner borders).

Syntax

object.rules[ = rules]

Settings

This read-write property takes one of these string values:

all Displays a border on all rows and columns.
cols Displays borders between all table columns.
groups Displays horizontal borders between all table groups. Groups are specified by the THEAD, TBODY, TFOOT, and COLGROUP elements.
none Removes all interior table borders.
rows Displays horizontal borders between all table rows.

The property is not set by default.

Applies To

TABLE, stylesheet

See Also

frame


screenX

Description

Returns coordinates relative to the physical screen size.

Syntax

object.screenX

Remarks

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

event


screenY

Description

Returns coordinates relative to the physical screen size.

Syntax

object.screenY

Remarks

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

event


scroll

Description

Turns the scroll bars on or off.

Syntax

object.scroll[ = scroll]

Settings

This read-write property can be one of the following strings:

yes Turns on the scroll bars. This is the default value.
no Turns off the scroll bars.

Applies To

BODY


scrollAmount

Description

Specifies the number of pixels the text scrolls between each subsequent drawing of the MARQUEE.

Syntax

object.scrollAmount[ = scrollAmount]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

MARQUEE


scrollDelay

Description

Specifies the speed of the MARQUEE scroll, in milliseconds.

Syntax

object.scrollDelay[ = scrollDelay]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

MARQUEE


scrollHeight

Description

Returns the element's scrolling height, in pixels. This is the distance between the top and bottom edges of the element's visible content. The physical height of the content, including the nonvisible content, can be obtained with the offsetHeight property.

Syntax

object.scrollHeight

Remarks

For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.

Setting

This read-only property is always a nonnegative integer.

Applies To

BODY, BUTTON, DIV, FIELDSET, FRAME, IFRAME, IMG, MARQUEE, SPAN, TEXTAREA

See Also

scrollLeft, scrollTop, scrollWidth


scrolling

Description

Specifies that the frame can be scrolled.

Syntax

object.scrolling[ = scrolling]

Settings

Possible values include;
auto The browser determines if the scroll bars are necessary.
no The frame cannot be scrolled.
yes The frame can be scrolled.

Remarks

The scroll bars default to "auto" if this attribute is omitted.

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

FRAME, IFRAME


scrollLeft

Description

Sets or retrieves the distance, in pixels, between the left edge of the element and the leftmost portion of the element that is currently visible in the window. This is equal to the horizontal distance that the content of the element has been scrolled.

Syntax

object.scrollLeft[ = scrollLeft]

Settings

This read-write property is always a nonnegative integer. Although it can be set to any positive or negative value, the property is set to zero if the assigned value is less than zero, and is set to the value of scrollWidth if the assigned value is greater than this. The default value is zero.

This property is always zero for elements that do not support scroll bars. For these elements, setting the property has no effect.

Remarks

For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.

Applies To

BODY, BUTTON, DIV, FIELDSET, FRAME, IFRAME, IMG, MARQUEE, SPAN, TEXTAREA

See Also

scrollHeight, scrollTop, scrollWidth


scrollTop

Description

Sets or retrieves the distance, in pixels, between the top of the element and the topmost portion of the content that is currently visible in the window. This is equal to the vertical distance that the content of the element has been scrolled.

Syntax

object.scrollTop[ = scrollTop]

Settings

This read-write property is always a nonnegative integer. Although it can be set to any positive or negative value, the property is set to zero if the assigned value is less than zero, and is set to the value of scrollHeight if the assigned value is greater than this. The default value is zero.

This property is always zero for elements that do not have scroll bars. For these elements, setting the property has no effect.

Remarks

For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.

Applies To

BODY, BUTTON, DIV, FIELDSET, FRAME, IFRAME, IMG, MARQUEE, SPAN, TEXTAREA

See Also

scrollHeight, scrollLeft, scrollWidth


scrollWidth

Description

Returns the element's scrolling width, in pixels. This is the distance between the left and right edges of the element's visible content.

Syntax

object.scrollWidth

Settings

This read-only property is always a nonnegative integer.

Remarks

For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.

Applies To

BODY, BUTTON, DIV, FIELDSET, FRAME, IFRAME, IMG, MARQUEE, SPAN, TEXTAREA

See Also

scrollHeight, scrollLeft, scrollTop, width


search

Description

Indicates the substring of the href property that follows the ? symbol. This is the query string or form data.

Syntax

object.search[ = search]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

A, AREA, location


sectionRowIndex

Description

Indicates the element's position in the TBODY, THEAD, or TFOOT rows collection. These sections are mutually exclusive, so the TR is always contained in one of these sections, as well as the TABLE. The rowIndex property indicates the element's position in the rows collection for the TABLE. Collection indexes are in source order of the HTML document.

Syntax

object.sectionRowIndex[ = element]

Return Value

This property has read-only permission.

Applies To

TR

See Also

sectionRowIndex, sourceIndex, cellIndex


selected

Description

Indicates that this item is the default. If not present, the first item is selected by default.

Syntax

object.selected[ = selected]

Remarks

This property is used to determine whether a value is submitted with the form. If the value of the control matches the default value, the control's value is not submitted. The value is only submitted when the control's value does not match the default value. Therefore, changing this value changes the rule for whether the value is submitted with the form.

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

OPTION

See Also

defaultSelected


selectedIndex

Description

Sets or retrieves an integer specifying the index of the selected option in a select object.

Syntax

object.selectedIndex[ = selectedIndex]

Remarks

Options in a select object are indexed in the order in which they are defined, starting with an index of zero. You can set the selectedIndex property at any time. The display of the select object updates immediately when you set the selectedIndex property. Both forms of the syntax specify the same value.

In general, this property is more useful for select objects that are created without the multiple attribute. If you evaluate selectedIndex when multiple options are selected, the selectedIndex property specifies the index of the first option only. Setting selectedIndex clears any other options that are selected in the select object.

The selected property of the select object's options array is more useful for select objects that are created with the MULTIPLE attribute. With the selected property, you can evaluate every option in the options array to determine multiple selections, and you can select individual options without clearing the selection of other options.

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

SELECT


self

Description

Refers to the current window. The property provides a way to explicitly refer to the current window or frame.

Syntax

object.self

Remarks

Use the self property to disambiguate a window property from a form of the same name. You can also use the self property to make your code more readable.

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

window


shape

Description

Specifies the type of shape used in the image map.

Syntax

object.shape[ = shape]

Settings

This read-write property takes a string specifying a shape. Each shape causes the coords attribute to take a different set of values.

circ Circle. Takes three coordinates: centerx, centery, and radius.
circle Circle. Takes three coordinates: centerx, centery, and radius.
poly Polygon. Takes three or more pairs of coordinates denoting a polygonal region.
polygon Polygon. Takes three or more pairs of coordinates denoting a polygonal region.
rect Rectangle. Takes four coordinates: x1, y1, x2, and y2.
rectangle Rectangle. Takes four coordinates: x1, y1, x2, and y2.

Applies To

AREA

See Also

coords


shiftKey

Description

Specifies the state of the SHIFT key, a Boolean value.

Syntax

object.shiftKey

Settings

This read-only property is TRUE if the SHIFT key is down, and FALSE if the key is up.

Applies To

event


size

Description

Specifies font size.

Syntax

object.size[ = size]

Settings

This read-write property takes an integer value in the range 1 through 7, with 7 representing the largest font.

Applies To

BASEFONT, FONT


size

Description

Sets the height of the HR element, in pixels.

Syntax

object.size[ = size]

Remarks

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

HR


size

Description

Specifies the size of the control.

Syntax

object.size[ = size]

Remarks

For the INPUT element, the size is in characters and represents the width of the text box. For the SELECT element, when the size is specified, it represents a list box with the specified number of rows.

This property has read-write permissions, meaning you can change as well as retrieve its current value.

Applies To

INPUT, SELECT

See Also

maxLength


sourceIndex

Description

Returns the ordinal position of the element in the source order as it appears in the all collection.

Syntax

object.sourceIndex

Remarks

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IFRAME, IMG, INPUT, INS, KBD, LABEL, LI, LINK, LISTING, MAP, MARQUEE, MENU, META, NEXTID, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.