当前位置: 首页 > 网络学院 > 客户端脚本教程 > 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