求点更改外观后怎么还是one。不应该是two吗
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>className属性</title>
<style>
.one{background:yellow; color:red;}
.two{background:pink; color:green;}
</style>
</head>
<body>
<p Id="ggg" class="one">再看看能不能成功</p>
<form> <input type="button" value="更改外观" onclick="bbb()"/>
</form>
<script type="text/javascript">
var mg=document.getElementById("ggg");
document.write(mg.className);
function bbb(){mg.className="two";
}
</script>
</body>
</html>