JavaScript Reference/Javascript Properties/rowIndex

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

"rowIndex" Example

   <source lang="javascript">

<html> <body> <script language="JavaScript">

   function function1(elem) {
       var m = elem.rowIndex; 
       alert("Row Index: "+m);
   }

</script>

Row 1
Row 2
Row 3
Row 4

</body> </html>


     </source>
   
  


"rowIndex" is applied to

   <source lang="javascript">

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

     </source>
   
  


"rowIndex" Syntax and Note

   <source lang="javascript">

Note: Read-only property. Returns the row number in the table.

Syntax:

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


     </source>