JavaScript Reference/Javascript Properties/rowIndex — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:21, 26 мая 2010
"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>