📅  最后修改于: 2022-03-11 15:02:37.094000             🧑  作者: Mango
// Add new item to start of list
var newItemFirst = document.createElement('li');
var newTextFirst = document.createTextNode('New List Item');
newItemFirst.appendChild(newTextFirst);
list.insertBefore(newItemFirst, list.firstChild);