<HTML>
<HEAD>
<script>
window.onload = function()
{
var dc = document.getElementById("one");
dc.onclick = function()
{
bigorsmall(dc);
};
};
function bigorsmall(a)
{
if(a.className == "small")
{
a.className = "big";
}
else
{
a.className = "small";
}
}
</script>
<style type="text/css">
.big{height:200px;width:200px;background:blue;}
.samll{height:150px;width:150px;background:red;}
</style>
</HEAD>
<BODY>
<div id = "one" class="big"></div>
</BODY>
</HTML>
-----------------------------------
代码的目的是点击 div 区域 变大变小 这段代码 哪里有错误 谢谢了
------解决方案--------------------
.samll{height:150px;width:150px;background:red;}
small拼错了