<script>
function get()
{var op=document.getElementById("p1");
 op.className="m1";
 }
function get1()
{var op=document.getElementById("p1");
 op.setAttribute("class","m1");
 }
</script>
<style type="text/css">
.m1{color:yellow;
    text-align:center;
font-weight:900;
font-family:"黑体";}
</style></head><body>
<p class="" id="p1">CSDN</p>
<form id="form1" name="form1" method="post" action="">
  <p>
    <input type="button" name="button" id="button" value="按钮1" onclick="get()"/>
</p>
  <p>
    <input type="button" name="button2" id="button2" value="按钮2" onclick="get1()"/>
</p>
</form>
<p>&nbsp;</p>
</body>
</html>为什么在IE6里 按钮2按下去是没有作用的,是不是IE6不兼容attributes的方法,请高手指点!