高手指点rows,cells,children
var tembh=obj.rows[i].cells[1].children[0].value;是什么意思呀?说说rows,cells,children怎么用
获取表格第i行第1列的第一个控件的value
比如下面这个例子
[CODE]<html>
<head>
<script language="javascript">
function shows() {
var tembh=gdCostDetail.rows[0].cells[0].children[1].value;
alert(tembh);
}
</script>
</head>
<body onload="shows();">
<table id="gdCostDetail" border="1">
<tr><td><input type=button value=clickme><input type=button
value=click>10</td><td>11</td><td>12</td></tr>
<tr><td>20</td><td>21</td><td>22</td></tr>
<tr><td>30</td><td>31</td><td>32</td></tr>
</table>
</body>
</html>[/CODE]