<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">NodeList</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">5</span>  DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>The <span class="literal">NodeList</span> object is an abstract representation
in the W3C DOM of a collection of nodes of any type. Any W3C DOM
property or method that returns a collection of nodes returns an
object of type <span class="literal">NodeList</span>. For example, the
<span class="literal">Node</span> object's
<span class="literal">childNodes</span> property and the
<span class="literal">Element</span> object's
<span class="literal">getElementsByTagName( )</span> method both return
<span class="literal">NodeList</span> objects. JavaScript exposes a
<span class="literal">NodeList</span> collections as an array that has the
familiar <span class="literal">length</span> property. Scripts can reference
individual items in the array through integer array indexes (inside
square brackets) or via the <span class="literal">NodeList</span>
object's <span class="literal">item( )</span> method.
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			Some node types have their own collections (e.g.,
<span class="literal">NamedNodeMap</span> for a collection of attribute nodes
and the <span class="literal">HTMLCollection</span> for a collection of HTML
element nodes). These other collection objects have extra properties
and methods that are meaningful only to the types of nodes inside the
collections. For instance, because text nodes (one of the simplest
type of <span class="literal">Node</span> object) do not have a property that
can contain an identifier, the <span class="literal">NodeList</span> object
does not include a method to reference an item by its ID. But an
<span class="literal">HTMLCollection</span> object (consisting entirely of the
more complex <span class="literal">HTMLElement</span> types of nodes) includes
another method (<span class="literal">namedItem( )</span>) that lets scripts
reference an item by its ID as well as integer index. The
distinctions among collection object types are readily apparent when
you compare the properties and methods of the collection objects you
actually script (see the descriptions in this chapter of the
<span class="literal">attributes</span> and <span class="literal">images</span> objects,
for example). The W3C DOM terminology, on the other hand, is not a
factor in scripts.
</p>
												</td>
</tr>
			</table>
		</div>

</body>
</html>