var childList = document.getElementById('test-list').children;
var arr = ['JavaScript','HTML','CSS'];
Array.from(childList ).filter((v)=>{arr.includes(v.innerText)?v:list.removeChild(v)})
继续抄,现在抄的作业,后面还会还回来的、
Sign in to make a reply
好耶
var childList = document.getElementById('test-list').children;
var arr = ['JavaScript','HTML','CSS'];
Array.from(childList ).filter((v)=>{arr.includes(v.innerText)?v:list.removeChild(v)})