定义和用法
length 属性可设置或返回数组中元素的数目。
浏览器支持
所有主要浏览器都支持length 属性。
语法
设置数组的数目:
array.length=number
Return the length of an array:
array.length
技术细节
返回值: | 一个数字,表示数组中的对象的元素数目。 |
---|---|
JavaScript 版本: | 1.1 |

length 属性可设置或返回数组中元素的数目。
所有主要浏览器都支持length 属性。
设置数组的数目:
array.length=number
Return the length of an array:
array.length
返回值: | 一个数字,表示数组中的对象的元素数目。 |
---|---|
JavaScript 版本: | 1.1 |