JavaScript Reference/Javascript Properties/sectionRowIndex

Материал из Web эксперт
Перейти к: навигация, поиск

"sectionRowIndex" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1(elem) {

   var m = elem.sectionRowIndex;
   alert("The zero-based row index is: "+m); 

} </script>

Row 1
Row 2
Row 3
Row 4

</body> </html>


     </source>
   
  


"sectionRowIndex" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<tr> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"sectionRowIndex" Syntax and Note

   <source lang="javascript">

Note: Read-only property. Returns the position of <tr> element int the rows of a <tbody>, <thead>, or <tfoot> element. If the specified row is in a <tbody>, <thead>, or <tfoot> element, returns the position of the row among all of the rows in the table.

Syntax:

document.getElementById("trID").sectionRowIndex document.all.trID.sectionRowIndex // IE only


     </source>