<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>控制类名</title>
<style type="text/css">
input{font-size:9px};
one{width:200px;
background-color:#0F0;
color:#9FF;}
two{height:300px;
background:#0F3;
color:#9FC;}
three{height:200px;
background-color:#0F6;
color:#9F9;}
four{height:100px;
background:url(file:///C|/Users/Administrator/Desktop/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9%20(3)/%E6%9E%AB%E5%8F%B6%20%E6%96%87%E5%AD%97/t01cb498b8eadccb8c1.jpg);
color:#9F6;}
five{clip:rect(auto, auto, auto, auto);}
</style>
</head>
<body>
<p id="p1" class="one">仿佛悲伤的人们能靠着雾霾遮住伤口
还羡慕着期待蓝天的少年总抬头</p>
<p id="p2">围观的 自愿的 做崇拜者</p>
<p id="p3">贪婪的 欺骗着 初学者</p>
<p id="p4">劝说者 自私的 做挑拨者</p>
<p id="p5">脆弱的 羡慕者 被安抚着</p>
<script type="text/javascript">
function p(){
var p1=document.getElementById("p1");
p1.className="one";
var p2=document.getElementById("p2");
p2.className="two";
var p3=document.getElementById("p3");
p3.className="three";
var p4=document.getElementById("p4");
p4.className="four";
var p5=document.getElementById("p5");
p5.className="five";}
document.write(p());
</script>
</body>
</html>
学习js