JavaScript Reference/Javascript Objects/Array — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
Содержание
"Array" Example
<html>
<body>
<script language="javascript">
function function1(){
var array = new Array();
array[0] = "Testing 1";
array[1] = "Testing 2";
alert(array.length);
}
</script>
<button onclick="function1();">Array length</button>
</body>
</html>
"Array" JavaScript Methods
+----------------+--------------------------------------------------------------+
| JavaScript |concat join |
| Methods |pop push |
| |reverse shift |
| |slice sort |
| |splice toSource |
| |toString unshift |
| |valueOf |
+----------------+--------------------------------------------------------------+
"Array" JavaScript Properties
+----------------+--------------------------------------------------------------+
| JavaScript |constructor length |
+----------------+--------------------------------------------------------------+
"Array" Syntax and Note
Note:
Create and store information into an array.
Syntax:
var arrayName = new Array()
arrayName.memberName