JavaScript Reference/Javascript Properties/rowIndex

Материал из Web эксперт
Версия от 11:21, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"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>