<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>menu hide show</title>
<script language="JavaScript">
maxh=0;
function hidde(obj)
{
if (maxh==0)
maxh=obj.style.pixelHeight;
if(obj.style.pixelHeight>0)
{
obj.style.pixelHeight-=10;
obj.filters.alpha.opacity-=4;
if(obj.style.pixelHeight==maxh/10)
obj.style.display='none';
obj1=obj
setTimeout('hidde(obj1)','1');
}
}
function show(obj)
{
if(obj.style.pixelHeight<maxh)
{
obj.style.display='';
obj.style.pixelHeight+=10;
obj.filters.alpha.opacity+=4;
obj1=obj
setTimeout('show(obj1)','1');
}
}
function turn(obj)
{
if (obj.style.display=='none')
show(obj);
else
hidde(obj);
}
</script>
</head>
<body>
<input type="button" name="Submit" value="hidde" onClick="hidde(table1)">
<input type="button" name="Submit" value="show" onClick="show(table1)">
<input type="button" name="Submit" value="turn" onClick="turn(table1)">
<div id="table1" style="height:200px;FILTER: alpha(Opacity=100);OVERFLOW: hidden;">
<table width="100%" height="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#42CC33" >
<tr>
<td>this is something<br>
br<br>
br<br>
br<br>
br<br>
br </td>
</tr>
</table>
</div><br>
this is the foot
</body>
</html>
posted on 2006-10-19 15:11
汪杰 阅读(529)
评论(0) 编辑 收藏 引用 所属分类:
divandcss