OBJECT
Objects Reference

OBJECT

Description

Inserts an object onto the HTML page. An object can appear in the HEAD or the BODY of a document.

Possible return values (those generated by Object Model properties) on the OBJECT tag will depend on the implementation of the OBJECT. For example, the readyState property will return null or error if the OBJECT does not implement a readyState property. Object Model properties available for an OBJECT depend on the contents of the OBJECT. See the documentation for the individual object for supported Object Model properties.

Note: the object property for the OBJECT element is a way of reconciling Object Model members that are duplicated by the OBJECT element's implementation and DHTML. For instance, if the OBJECT implements an item method, and DHTML implements an item method, to use the one defined for the OBJECT, document.all.objectID.object.item() would differentiate these methods.

Remarks

This element is a block element.

Properties

accessKey, align, altHTML, classid, className, code, codeBase, codeType, data, dataFld, dataSrc, dataFormatAs, document, height, hspace, id, isTextEdit, lang, language, name, object, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, readyState, sourceIndex, style, tabIndex, tagName, title, type, vspace, width

Methods

blur, click, contains, focus, getAttribute, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onafterupdate, onbeforeupdate, onblur, onclick, ondataavailable, ondatasetchanged, ondatasetcomplete, ondblclick, ondragstart, onerror, onerrorupdate, onfilterchange, onfocus, onreadystatechange, onrowenter, onrowexit, onselectstart

HTML Element

OBJECT


OL

Description

Draws lines of text as an ordered list.

Remarks

This element is a block element.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, start, style, tagName, title, type

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

OL

See Also

LI


OPTION

Description

Denotes one choice in a select list.

Remarks

Although OPTION elements do not appear in the all collection, you can gain access to these elements by applying the options collection to the SELECT element.

Style settings that you apply to the style object for this element are ignored. But style settings that you apply to the containing SELECT element are also applied to this element.

This element is a block element.

Example

The following JScript example displays the text for all options in the first SELECT list in the document.

var el = document.all.tags("SELECT").item(0);
if (el != null) {
    for (i=0; i<el.options.length; i++) {
        alert("Option " + i + " is " + el.options(i).text);
    }
}

Properties

className, document, id, isTextEdit, language, offsetHeight, offsetParent, offsetWidth, parentElement, parentTextEdit, selected, sourceIndex, style, tagName, text, value

Methods

contains, getAttribute, removeAttribute, scrollIntoView, setAttribute

HTML Element

OPTION

See Also

SELECT


P

Description

Denotes a paragraph.

Remarks

This element is a block element.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

P


PLAINTEXT

Description

Renders text in fixed-width type without processing tags.

Remarks

This element is a block element.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

PLAINTEXT

See Also

XMP


PRE

Description

Renders text in fixed-width type.

Remarks

This element is a block element.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

PRE

See Also

XMP


Q

Description

Sets apart a quotation in text.

Remarks

This element is a block element.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

Q

See Also

BLOCKQUOTE


S

Description

Renders text in strike-through type.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

S

See Also

STRIKE


SAMP

Description

Specifies a code sample.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

SAMP

See Also

CODE


screen

Description

Contains information about the client's screen and rendering abilities.

Properties

bufferDepth, colorDepth, height, updateInterval, width

Applies To

window


SCRIPT

Description

Specifies a script for the page that will be interpreted by a script engine.

Remarks

Code within the SCRIPT block that is not contained within a function is executed immediately as the page is loaded. To keep scripts from being displayed on down-level browsers, the SCRIPT block should be nested within a comment block.

This element is a block element.

Properties

className, defer, document, event, htmlFor, id, innerHTML, innerText, isTextEdit, language, parentElement, parentTextEdit, readyState, sourceIndex, src, style, tagName, text, title, type

Methods

contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, setAttribute

Events

onerror, onload, onreadystatechange

HTML Element

SCRIPT


SELECT

Description

Denotes a list box or drop-down list.

Examples

The following JScript example displays the number of options in the first SELECT list in the document. It also shows the index value of the currently selected option.

var el = document.createElement("OPTION");
el.text="Apples";
el.value="5";
document.all.MyList.add(el);

The following JScript example adds a new option to the end of an existing SELECT list.

var el = document.createElement("OPTION");
el.text="Apples";

el.value="5";
document.all.MyList.add(el);

Properties

accessKey, className, dataFld, dataSrc, disabled, document, form, id, isTextEdit, lang, language, length, multiple, name, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, recordNumber, selectedIndex, size, sourceIndex, style, tabIndex, tagName, type, value

Methods

add, blur, click, contains, focus, getAttribute, insertAdjacentHTML, insertAdjacentText, item, remove, removeAttribute, scrollIntoView, setAttribute, tags

Collections

all, children, filters, options

Events

onafterupdate, onbeforeupdate, onblur, onchange, onclick, ondblclick, ondragstart, onerrorupdate, onfilterchange, onfocus, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onresize, onrowenter, onrowexit, onselectstart

HTML Element

SELECT

See Also

OPTION

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