获取具有行索引的子节点的值

Get value of child node with row index

本文关键字:子节点 索引 获取      更新时间:2023-09-26

如何使用动态创建的rowindex获得子节点的值?

我尝试使用下面的代码,但错误出现"Unable to get the value of the property childnodeID"

var table = document.getElementById('tableID');
var Row = table.rows['childnodeID']; //error
Row.cells[0].innerText = i;

childnodeID必须是数字。Index从来不是字符串。必须是一个数字