鼠标移到上面就展开的效果

2008-8-30 chenmo 网站建设

 

鼠标移到上面就展开的效果

<script>
var intervalId = null;
function move(id,state){
 var obj = document.getElementById(id);
 if(intervalId != null)
  window.clearInterval(intervalId);
 function change(){
     var h = parseInt(obj.offsetHeight);
     obj.style.height = (state == "down") ? (h + 2) : (h - 2);
 }
 intervalId = window.setInterval(change,10);
}
</script>
<table border="1" cellpadding="0" cellspacing="0" id="mytd" onmouseover="move('mytd','down');" onmouseout="move('mytd','out');">
<tr><td>无忧脚本 - 风云突变</td></tr></table>

Powered by emlog 湘ICP备13007859号 空间由景安网络赞助