<!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> <title>带缓冲的伸缩隐藏层</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <script language="javascript"> var flag=0; function f_s(id){ var obj=document.getElementById(id); obj.style.display="block"; obj.style.height="1px"; var changeW=function(){ var obj_h=parseInt(obj.style.height); if(obj_h<=350){ obj.style.height=(obj_h+Math.ceil((350-obj_h)/10))+"px"; } else{ clearInterval(bw1); } } bw1= setInterval(changeW,1); if(flag>0){ clearInterval(bw2); } } function closeW(id){ flag++; var obj=document.getElementById(id); var closeDiv=function(){