鼠标进出,背景变大小

<script language="javascript">
 function show1(){
  document.getElementById("ccc").className = "aa";
 }
 function show2(){
  document.getElementById("ccc").className = "bb";
 }
</script>
<style type="text/css">
.aa{
 background-color:#87FACB;
 width:300px;
 height:300px;
}
.bb{
 background-color:#5DFD43;
 width:200px;
 height:200px;
}
</style>

------------------------------------------------

<div onmousemove="show1()" id="ccc" onmouseout="show2()" class="aa">
鼠标进出—变大小背景色
</div>

posted @ 2011-10-18 22:13  dotnetlina  阅读(151)  评论(0编辑  收藏  举报