w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM rows ¼¯ºÏ
The rows collection returns an array containing each row in a table.
rows¼¯ºÏ·µ»ØÒ»¸ö°üº¬±í¸ñÖÐÿ¸örowµÄÊý×é
tableObject.rows[] |
<html>
<head>
<script type="text/javascript">
function specifyRow()
{
alert(document.getElementById('myTable').rows[0].innerHTML)
}
</script>
</head>
<body>
<table id="myTable" border="1">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
</table>
<form>
<input type="button" onclick="specifyRow()"
value="Show innerHTML of first row">
</form>
</body>
</html> |
InnerHTML of a row
ÍùrowÀïinnerHTML
Add a cell to a table row through the rows collection
ͨ¹ýrows¼¯ºÏÍù±í¸ñÀï¼Ócell
Align the cell content in a table row
¶ÔÆë±í¸ñÐÐÀïcellµÄÄÚÈÝ
Vertical align the cell content in a table row
°üº¬ÔÚ±í¸ñÐÐÀïcellµÄ´¹Ö±¶ÔÆë·½Ê½
Align the cell content in a single cell
½ö¶ÔÒ»¸öcellÄÚÈݽøÐÐ¶ÔÆë
Vertical align the cell content in a single cell
½ö¶ÔÒ»¸öcellµÄÄÚÈݽøÐд¹Ö±¶ÔÆë
Change the content of a table cell
¸Ä±ä±í¸ñcellµÄÄÚÈÝ
Change the colspan of a table row
¸Ä±ä±í¸ñrowµÄ¿ç¶È
ÆÀÂÛ (0)
All