Click to Rate and Give Feedback
Properties
 length Property
length Property
Note: This documentation is preliminary and is subject to change.

Sets or retrieves the number of objects in a collection.

Syntax

HTMLN/A
Scripting[ iLength = ] object.length

Possible Values

iLengthInteger that specifies or receives the number of objects.

The property is read/write for all objects except the following, for which it is read-only: COMMENT, pages. The property has no default value.

Remarks

The window.length property returns the number of frames contained in a window.

The comment.length property returns the number of characters in the object.

Although this property is read-only for most of the objects listed in the Applies To section, it is read/write for the areas collection (image maps), the options collection (select boxes), and the select object. In all other cases, this property has read-only permission, which means you can retrieve, but cannot change, its current value.

The form.length property does not count input type=image elements. To access all elements contained in a form, use the children collection.

For Microsoft Windows CE only, this collection will always be empty.

In Microsoft Internet Explorer 6 and later, this property applies to the comment object.

 New for Windows Internet Explorer 8 In Internet Explorer 8 and greater, this property applies to the IHTMLDocumentCompatibleInfo object.

Standards Information

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

all, anchors, applets, areas, attributes, behaviorUrns, bookmarks, boundElements, cells, childNodes, children, COMMENT, controlRange, elements, embeds, filters, forms, frames, images, imports, links, namespaces, options, pages, plugins, rows, rules, scripts, SELECT, styleSheets, tBodies, TextRectangle, TextRange, window, FORM, documentCompatibleInfoCollection
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker