<div> <p>hahahah</p> <p>hahahah</p> <p>hahahah</p> <p>hahahah</p><p>hahahah</p></div> <script>
var ps=document.getElementsByTagName("p");
for ( var i in ps){
ps[i].style.backgroundColor="red";
}
</script>控制台打印会报错,why?
添加回答
举报
0/150
提交
取消