我照着你的去试了下,为什么老是缩回到最小后又往下拉再缩一次?实在想不出来,请楼主赐教
<html xmlns="http://www.w3.org/1999/xhtml" >
<head >
<title>無題のページ</title>
<script language="javascript" type ="text/javascript">
function divMove(){
var div_menu;
var div_body;
div_menu = document.all("div_menu");
div_body = document.all("div_input");
div_body.style.display = "block";
// alert(div_body.style.offsetHeight);
if(div_body.offsetHeight > 0){
div_body.style.pixelHeight = div_body.offsetHeight-4;
time = setTimeout("divMove()","1");
}
}
</script>
</head>
<body >
<form name="form1">
<div id="div_menu" style="left: 15%; top: 180px; width:250px;height:20px; background-color: #ffffcc;overflow:hidden;display:block;" onclick="divMove()" >
<font color=blue >Click here!</font>
</div>
<div id="div_input" style="left: 15%; top: 200px; background-color: #ffccff;width:250px;height:200px;overflow:hidden;display:block;" >
<table >
<tr>
<td>
To</td>
<td>
<input type ="text" name="txt_from" /></td>
</tr>
<tr>
<td>
Subject</td>
<td>
<input type="text" name="txt_subject" /></td>
</tr>
<tr>
<td>
Content</td>
<td>
<input type="text" name="txt_content" /></td>
</tr>
<tr><td>
<input type="submit" value="Send" />
</td></tr></table>
</div>
</form>
</body>
</html>
[此贴子已经被作者于2006-9-27 11:03:36编辑过]