<script type="text/javascript">
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" οnmοuseοver="move('mytd','down');" οnmοuseοut="move('mytd','out');">
<tr><td>会动的表格</td></tr></table>
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" οnmοuseοver="move('mytd','down');" οnmοuseοut="move('mytd','out');">
<tr><td>会动的表格</td></tr></table>