Sets or retrieves the number of objects in a collection.
the number of objects.
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
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 length property does not count input type=image elements. To access all elements contained in a form, call QueryInterface on IHTMLFormElement and request an IHTMLElement interface. Use the children property of the IHTMLElement interface to retrieve a collection of all elements in the form.
This property is read-write on the areas collection for image maps and the options collection for select boxes. This allows a developer to shrink the collection.
For Windows CE only, this collection will always be empty.
As of Windows Internet Explorer 8, this property is read-only in the areas collection.
In Microsoft Internet Explorer 6 and later, this property applies to the comment object.
Build date: 11/17/2013