加一句overflow就可以了
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="ProgId" content="VisualStudio.HTML">
<meta name="Originator" content="Microsoft Visual Studio .NET 7.1">

<script language="javascript">var flag="1";
function $(namediv)
{
return document.getElementById(namediv)
}
function min()
{
chdivinterval = setInterval(change, 1);
}
function change()
{ if(flag=="1")
{
   $("newdiv").style.height=$("newdiv").style.height.replace("px","")-1+"px";
if($("newdiv").style.height=="0px")
{
flag="0";

}

}
if(flag=="0")
{    
   $("newdiv").style.height=parseInt($("newdiv").style.height.replace("px",""))+1+"px";   
if($("newdiv").style.height=="180px")
{
flag="1";
}
}
}
</script>
</head>
<body>
<div>想在外层的DIV的高度在0px-180px之间慢慢变化的同时,让内层的DIV随外层的DIV高度变小而慢慢消失,再随外层的DIV高度变大而慢慢出现,没有实现,请大家帮忙!感谢!</div>
<input type="button" value="开始" onclick="min()" ID="Button1" NAME="Button1" /><br/>
<div id="newdiv" class="div" style="DISPLAY:inline;width:160px;height:180px;POSITION:TOP:20px; BORDER: #000000 1px solid;overflow:hidden">
<div style="DISPLAY:inline;width:160px;height:40px;POSITION:TOP:30px; BORDER: #000000 1px solid;"><div>
</div>

</body>
</html>