EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

length property

Sets or retrieves the number of objects in a collection.

Syntax

JavaScript

p = object.length

Property values

Type: Integer

the number of objects.

Standards information

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 Windows CE only, this collection will always be empty.

See also

all
anchors
applets
areas
attributes
bookmarks
boundElements
cells
childNodes
children
comment
controlRange
documentCompatibleInfoCollection
elements
embeds
form
forms
frames
images
imports
links
options
pages
rows
rules
scripts
select
styleSheets
tBodies
TextRange
TextRectangle
window

 

 

Mostrar:
© 2014 Microsoft