<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title><style>
.box{ width:200px; border:1px solid #000;   display:none; }
</style></head>
<body><a href="#" id="a1"  >click</a>
<div class="box" id="content" >fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>
fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>fff<br>
fff<br>fff<br>fff<br>fff<br>fff<br></div><script language="JavaScript" type="text/javascript">
<!--function $(id){
    return document.getElementById(id)
}var h = 0;
var timer = null;
$('a1').onclick= add;function add(){
    var obj = $('content');
    obj.style.display='block';
    obj.style.height = h;
    obj.style.overflow='hidden';
    h = h+10;
    timer = setTimeout('add()',50);
    if(h>=$('content').scrollHeight){
        if(timer != null) clearTimeout(timer);
        h = $('content').clientHeight;
        $('a1').onclick = dec;
    }
}
function dec(){
    var obj = $('content');
    obj.style.display='block';
    obj.style.height = h;
    obj.style.overflow='hidden';
    h = h-10;
    timer = setTimeout('dec()',50);
    if(h <= 0){
        if(timer != null) clearTimeout(timer);
        h = 0;
        obj.style.display='none';
        $('a1').onclick = add;
    }
}//-->
</script>
</body>
</html>