Home | Top | Web development | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Retrieves the position of the object in the rows collection for the table .
Syntax
N/A |
[ iIndex = ] TR.rowIndex |
Possible Values
iIndex | Integer that receives Integer that specifies the index number. |
The property is read-only. The property has no default value.
Remarks
This property is different from sectionRowIndex , which indicates the object's position in the tBody , tHead , or tFoot rows collection. These sections are mutually exclusive, so the tr is always contained in one of these sections and in the table . You can determine the rowIndex property of an object by the order in which the object appears in the HTML source.
Example
This example function shows how to use the rowIndex attribute to format a table . The function sets the background color of the rows in the table to black or white, alternating row by row.
function formatTable(oTable)
Standards Information
This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
|
TR |
Home | Top | Web development | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |