document.getElementById("p1").style.color="blue"; document.getElementById("p2").style.color="blue";
给个同名class,document.getElementByClassName