<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?
相关分类