var tbody = document.getElementById('table').lastChild;
var tbody = document.getElementById('table').lastChild;
這個為什么還是獲得的是<table></table>層的? 不應(yīng)該是<tr>層嗎
var tbody = document.getElementById('table').lastChild;
這個為什么還是獲得的是<table></table>層的? 不應(yīng)該是<tr>層嗎
2017-09-12
舉報
2017-09-13
確實返回的是<tr>層,你可以document.write(tbody);看看,是[object HTMLTableSectionElement]