当前位置: 首页 > 网络学院 > 客户端脚本教程 > JavaScript > JS数组对象参考

JavaScript
JS 字符串
JS Date
JS数组,JS Array
JS Boolean
JS Math
JS HTML DOM
JS Browser
JS Cookies
JS 校验
JS Animation
JS Image Maps
JS Timing
JS 建立对象
JS 摘要
JS 实例
JS 对象实例
JS DOM 实例
JS数组对象参考
JS布尔对象参考
JS日期对象参考

JavaScript 中的 JS数组对象参考


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 935 ::
收藏到网摘: n/a

Array Object Methods
数组对象方法

FF: Firefox, N: Netscape, IE: Internet Explorer
FF:火狐,N:网景,IE

Method
方法
Description
描述
FF N IE
concat() Joins two or more arrays and returns the result
将两个或两个以上的数组值连接起来,合并后返回结果
1 4 4
join() Puts all the elements of an array into a string. The elements are separated by a specified delimiter
将数组中的所有元素合并起来成为一条字符串。每个元素可以指定他们的分隔标记。
1 3 4
pop() Removes and returns the last element of an array
删除并返回数组最后的元素
1 4 5.5
push() Adds one or more elements to the end of an array and returns the new length
在数组的末尾加上一个或多个元素,并且返回新的数组长度值
1 4 5.5
reverse() Reverses the order of the elements in an array
将数组中的排列顺序做反向排列
1 3 4
shift() Removes and returns the first element of an array
删除并返回数组中第一个元素值
1 4 5.5
slice() Returns selected elements from an existing array
从现有数组中的某个元素开始依次返回
1 4 4
sort() Sorts the elements of an array
对数组中的元素进行排序
1 3 4
splice() Removes and adds new elements to an array
为数组删除并添加新的元素
1 4 5.5
toSource() Represents the source code of an object
显示对象的源代码
1 4 -
toString() Converts an array to a string and returns the result
将数组转换为字符串,并返回结果
1 3 4
unshift() Adds one or more elements to the beginning of an array and returns the new length
为数组的开始部分加上一个或多个元素,并且返回该数组的新长度
1 4 6
valueOf() Returns the primitive value of an Array object
返回数组对象的原始值
1 2 4

 


Array Object Properties
数组对象属性

Property
属性
Description
描述
FF N IE 
constructor A reference to the function that created the object
所建立对象的函数参考
1 2 4
index   1 3 4
input   1 3 4
length Sets or returns the number of elements in an array
设置或返回数组内元素的数字
1 2 4
prototype Allows you to add properties and methods to the object
为对象加上属性和方法
1 2 4

评论 (0) All

登陆 | 还没注册?