var table =document.getElementById("tab1");
var rows = table.rows.length;
alert('行数'+rows);
var colums = table.rows[0].cells.length;
var rows = table.rows.length;
alert('行数'+rows);
var colums = table.rows[0].cells.length;
alert('列数'+colums);
table相当于一个二维数组element类
Table{
rows = Rows[]();
}
Rows{
cells = Cells[]();
}
获取table中的值 table.rows[0].cells[0].innerText 或者 innerHTML