<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
window.onload=function(){
var thisTable = document.getElementById("thisTable");
var tbody = thisTable.children;
//console.log(tbody);
var trs = tbody.children;
for(var i=0;trs.length;i++){
console.log(trs[i]);
}
}
</script>
</head>
<body>
<table id="thisTable">
<tr>
<td>id</td>
<td>name</td>
<td>age</td>
</tr>
<tr>
<td>001</td>
<td>Laowang</td>
<td>10</td>
</tr>
<tr>
<td>002</td>
<td>Yan</td>
<td>9</td>
</tr>
</table>
</body>
</html>
thisTable.tbodies[0].rows[0].cells[0]獲取到的是表格主體第一行第一個單元格