<div id="div1" style="width:800px;height:80px;border:1px solid gray;">如何给一个DIV层加一个按钮(层在页面底部)</div>
<input type="button" value="Test" onclick="test()"/>
<script type="text/javascript">
function test()
{
var obj=document.getElementById("div1");
var height=obj.style.height;
obj.style.height=(height=="80px")?"10px":"80px";
}
</script>