HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

length

Description

The length of HTMLOptionsCollection for JS returns the number of elements in the collection.

When set to a smaller number than the existing length, truncates the number of option elements in the container corresponding to collection.

When set to a greater number than the existing length, if that number is less than or equal to 100000, adds new blank option elements to the container corresponding to collection.

Syntax

collection.length
collection.length = value

Examples

1 · get

2 · set · < length

3 · set · > length