如何用JS语言,为元素添加属性var h1 = document.getElementByTagName('h1')获取domh1.setAttribute('align','center')添加属性v2023-04-14JavaScript200