document.getElementById('p2').style.cssText='color:blue;font-family:Arial;font-size:larger';
不过这样写会替换掉原有的style 要注意