0
我想讀取基於tr id的表的值,但無法將我的頭圍繞如何做到這一點。我希望有人會如此善良並幫助我。謝謝。從同一表tr ID讀取td值
// Id of the tr in quetion 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);
}
是的,這很適合我。非常感謝你。我會盡快接受答案。 – user1054844 2014-11-05 13:14:39