為什麼代碼裡沒 <tbody>,但它還是會出現?
var?tbody?=?document.getElementById("table").childNodes; document.write(tbody[1].nodeName)?//結果為TBODY
我在代碼裡找不到?<tbody>?標籤,為什麼它會出現?
var?tbody?=?document.getElementById("table").childNodes; document.write(tbody[1].nodeName)?//結果為TBODY
我在代碼裡找不到?<tbody>?標籤,為什麼它會出現?
2016-09-08
舉報
2016-09-08
table標簽默認加載順序是thead tfoot tbody,tbody是最后加載的所以用document.getElementById("table").lastchild引用。
<table>
????<tbody>
????????<ul><li></li></ul>
????</tbody>
</table>