📄 jsref_obj_array.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript Array Object Reference</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>JavaScript Array Object Reference</h1>
<hr />
<h2>Array Object Methods</h2>
<p><b>FF</b>: Firefox, <b>N</b>: Netscape, <b>IE</b>: Internet Explorer</p>
<table class="ex" cellspacing="0" border="1" width="100%" id="table6">
<tr>
<th width="20%" align="left" valign="top">Method</th>
<th width="68%" align="left" valign="top">Description</th>
<th width="4%" align="left" valign="top">FF</th>
<th width="4%" align="left" valign="top">N</th>
<th width="4%" align="left" valign="top">IE</th>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_concat_array.asp">concat()</a></td>
<td valign="top">Joins two or more arrays and returns the result</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_join.asp">join()</a></td>
<td valign="top">Puts all the elements of an array into a string. The
elements are separated by a specified delimiter</td>
<td valign="top">1</td>
<td valign="top">3</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_pop.asp">pop()</a></td>
<td valign="top">Removes and returns the last element of an array</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">5.5</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_push.asp">push()</a></td>
<td valign="top">Adds one or more elements to the end of an array and returns
the new length</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">5.5</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_reverse.asp">reverse()</a></td>
<td valign="top">Reverses the order of the elements in an array</td>
<td valign="top">1</td>
<td valign="top">3</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_shift.asp">shift()</a></td>
<td valign="top">Removes and returns the first element of an array</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">5.5</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_slice_array.asp">slice()</a></td>
<td valign="top">Returns selected elements from an existing array</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_sort.asp">sort()</a></td>
<td valign="top">Sorts the elements of an array</td>
<td valign="top">1</td>
<td valign="top">3</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="jsref_splice.asp">splice()</a></td>
<td valign="top">Removes and adds new elements to an array</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">5.5</td>
</tr>
<tr>
<td valign="top"><a href="jsref_toSource_array.asp">toSource()</a></td>
<td valign="top">Represents the source code of an object</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">-</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_toString_array.asp">toString()</a></td>
<td valign="top">Converts an array to a string and returns the result</td>
<td valign="top">1</td>
<td valign="top">3</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_unshift.asp">unshift()</a></td>
<td valign="top">Adds one or more elements to the beginning of an array and
returns the new length</td>
<td valign="top">1</td>
<td valign="top">4</td>
<td valign="top">6</td>
</tr>
<tr>
<td valign="top"><a target="_top" href="jsref_valueOf_array.asp">valueOf()</a></td>
<td valign="top">Returns the primitive value of an Array object</td>
<td valign="top">1</td>
<td valign="top">2</td>
<td valign="top">4</td>
</tr>
</table>
<br />
<hr>
<h2>Array Object Properties</h2>
<table class="ex" cellspacing="0" border="1" width="100%" id="table5">
<tr>
<th width="20%" align="left">Property</th>
<th width="68%" align="left">Description</th>
<th width="4%" align="left">FF</th>
<th width="4%" align="left">N</th>
<th width="4%" align="left">IE </th>
</tr>
<tr>
<td valign="top"><a href="jsref_constructor_array.asp">constructor</a></td>
<td valign="top">A reference to the function that created the object</td>
<td valign="top">1</td>
<td valign="top">2</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">index</td>
<td valign="top"> </td>
<td valign="top">1</td>
<td valign="top">3</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">input</td>
<td valign="top"> </td>
<td valign="top">1</td>
<td valign="top">3</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="jsref_length_array.asp">length</a></td>
<td valign="top">Sets or returns the number of elements in an array</td>
<td valign="top">1</td>
<td valign="top">2</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="jsref_prototype_array.asp">prototype</a></td>
<td valign="top">Allows you to add properties and methods to the object</td>
<td valign="top">1</td>
<td valign="top">2</td>
<td valign="top">4</td>
</tr>
</table>
<br />
<hr />
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -