JavaScript Reference/Javascript Collections/all
Содержание
"all" Example
<source lang="javascript">
<html> <body> <input type="button"
id="button" value="See the value of this button" onclick="alert(document.all("button").value);">
</body> </html>
</source>
"all" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | | <bgsound> |
| ||| |<body> <button> |
| || | |
| |<dir>| | |<col> <colgroup> | | |<custom>
| | | || | |document | | |
- | | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> | | |<head> <hn> | | |
<html> || | <iframe> | | |<img> | | | <label> |
| |<legend>- | | |<link> <listing> | | |<map> <marquee> | | |<menu> <object> | | |
<option> | | |
| | || | | <script> | | |<select> | | || | | | | || | |<tbody>
| | |<textarea> <tfoot> |
| |<thead> | | |<title> | | | | | | | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>
"all" JavaScript properties and JavaScript methods
<source lang="javascript"> JavaScript properties and JavaScript methods
item(), length, namedItem(), tags(), urns()
</source>
"all" Syntax Parameters and Note
<source lang="javascript"> Note: Returns an array of all the elements in the object.
Syntax:
objectName.all // returns all elements objectName.all(param1, param2) // returns an individual element
param1 Required; zero-based index or desired member"s id or name attribute.
param2 Optional; the zero-based index if param1 matches more than one element.
</source>