JavaScript Reference/Javascript Collections/rows
Содержание
"rows" Example
<html>
<body>
<table id=myTable width="16%" border="1">
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
</table>
<script language="JavaScript">
var m = document.getElementById("myTable").rows.length;
alert(m);
</script>
</body>
</html>
"rows" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<table> <tbody> |
| |<tfoot> <thead> |
+----------------+--------------------------------------------------------------+
"rows" JavaScript properties and JavaScript methods
JavaScript properties and JavaScript methods
deleteRow(), item(), insertRow(), length, namedItem(), tags(), urns()
"rows" Syntax Parameters and Note
Note:
Returns an array of all the rows in a <table> element.
Syntax:
document.getElementById("elementID").rows // returns all rows
document.getElementById("elementID").rows(param1, param2) // returns an individual row
document.all.elementID.rows // IE only
document.all.elementID.rows(param1, param2) // IE only
Parameters:
param1 Required;
param2 Optional;