otest.lastChild[0]與otest.lastChild有什么區別
使用otest.insertBefore(newcode,otest.lastChild),新加入的li標簽內容“php“輸出在”HTML“前面,而otest.lastChild[0]新加入的li標簽內容“php“輸出在最后面,為什么呢?
使用otest.insertBefore(newcode,otest.lastChild),新加入的li標簽內容“php“輸出在”HTML“前面,而otest.lastChild[0]新加入的li標簽內容“php“輸出在最后面,為什么呢?
2021-03-29
舉報
2022-05-06
是lastChild[0]還是childNodes[0]?