object.rows
object.rows(vIndex[,iSubIndex]) 返回 数组 表格所有行 Array of tr objects.
object.cells
object.cells(vIndex [,iSubIndex]) 返回 数组 行的所有表格 Array of td and th elements contained by the object. If the object is a tr, the array contains elements only in that table row. If the object is a table, the array contains all elements in the table.
object.rows(vIndex[,iSubIndex]) 返回 数组 表格所有行 Array of tr objects.
object.cells
object.cells(vIndex [,iSubIndex]) 返回 数组 行的所有表格 Array of td and th elements contained by the object. If the object is a tr, the array contains elements only in that table row. If the object is a table, the array contains all elements in the table.
解决方案 »
- 请教一个javascript的问题!
- 谁能帮我解一下这个JS文件,急用,非常感谢!
- JavaScript
- 求一段背景颜色交替的JS代码
- 我想輸入用戶的ID後 換行自動帶出用戶其他的信息 於是想用onmouseover(),onmouseout() 調用****.do 實現對action類 ****.java 的操作, 查出用戶信息..... 請賜教 先謝謝了 !!!!!!!
- 请教:C#程序中执行confirm语句的问题
- 梅花雪老兄你好,有一个关于你写的MzTreeView10问题请教?
- jqGrid 给列表添加行按钮
- 窗口的关闭
- 急!在JavaScript里输入引号???
- 高手请进,一个代码的问题。
- 请教大家一个简单的正则试,在线等,谢谢.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<table>
<tr>
<td>String1_1</td>
<td>String1_2</td>
<td>String1_3</td>
</tr>
<tr>
<td>String2_1</td>
<td>String2_2</td>
<td>String2_3</td>
</tr>
<tr>
<td>String3_1</td>
<td>String3_2</td>
<td>String3_3</td>
</tr>
<tr>
<td>String4_1</td>
<td colspan="2">String4_2</td>
</tr>
</table>
<script type="text/javascript">
<!--
var oTbe = document.getElementsByTagName("table")[0];
var aData = new Array(oTbe.rows.length);
for (var i=0; i<oTbe.rows.length; i++)
{
aData[i] = new Array(oTbe.rows[i].cells.length);
for (var j=0; j<oTbe.rows[i].cells.length; j++)
{
aData[i][j] = oTbe.rows[i].cells[j].innerHTML;
}
}
alert(aData.join("\n"));
//-->
</script>
</body>
</html>