var pArr = Array.from(document.getElementsByTagName('p'))
//Array.from将节点列表转为真数组,然后就可以用forEach方法了
pArr.forEach((e)=>{
e.style.color = 'red'
})