tBodiesNN 6 IE 4 DOM 1  

  

This is a collection of all tbody elements contained within a single table element. Collection members are sorted in source code order.

 
Object Model Reference
 
document.getElementById("tableID").tBodies
 
Object-Specific Properties
 
length
 
Object-Specific Methods
 
item( )namedItem( )tags( )urns( )
 
Object-Specific Event Handler Properties

None.

lengthNN 6 IE 4 DOM 1  

Read-only  

Returns the number of elements in the collection.

 
Example
 
var howMany = document.getElementById("myTable").tBodies.length;
 
Value

Integer.

item( )NN 6 IE 4 DOM 1  

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

  

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

 
Parameters
 
  • When the parameter is a zero-based integer, the returned value is a single element corresponding to the specified item in source code order (nested within the current element); when the parameter is a string (IE only), the returned value is a collection of elements with id properties that match that string.
  • In IE only, if you specify a string value for the first parameter, you can use the second parameter to specify a zero-based index that retrieves the specified element from the collection with id properties that match the first parameter's string value.
 
Returned Value

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

namedItem( )NN 6 IE 6 DOM 1  

namedItem("ID")

  

Returns a single tBody object or collection of tBody objects corresponding to the element matching the parameter string value.

 
Parameters
 
  • The string that contains the same value as the desired element's id attribute.
 
Returned Value

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

tags( )NN n/a IE 4 DOM n/a  

tags("tagName")

  

Returns a collection of objects (among all objects nested within the current collection) whose tags match the tagName parameter.

urns( )NN n/a IE 5(Win) DOM n/a  

urns(URN)

  

See the all.urns( ) method.