Javascript Reference
Categories: links

javascript links item( )

@March 15, 2008, 1:22 a.m.
item( )Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

item(index) item(index[, subindex])

  

Returns a single object or collection of objects corresponding to the element matching the index value (or, optionally in IE/Windows, the index and subindex values).

 
Parameters
 
  • When the parameter is a zero-based integer (as required for Netscape 6), the returned value is a single element corresponding to the said numbered item in source code order (nested within the current element). When the parameter is a string (allowed by IE/Windows), the returned value is a collection of elements with id or name properties that match that string.
  • If you specify a string value for the first parameter (in IE/Windows), you may use the second parameter to specify a zero-based integer to retrieve a specific element from the collection with id or name properties that match the first parameter's string value.
 
Returned Value

One object or collection (array) of objects. If there are no matches to the parameters, the returned value is null.


Powered by Linode.