【发布时间】:2014-11-05 13:04:47
【问题描述】:
我正在尝试根据 tr id 读取 table 的值,但无法理解如何执行此操作。
// Id of the tr in question for example.row_17
var d =c["id"];
console.log(d);
// Here I can read all the td values, but I only want
// the ones inside the tr id = "row_17"
var cols =document.getElementById('report_table').getElementsByTagName('td'),
colslen = cols.length, i = -1; > while(++i < colslen)
{ console.log(cols[i].innerHTML);
}
【问题讨论】:
标签: javascript jquery row