使用js实现折叠菜单
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>折叠菜单</title>
<script type="text/javascript">
function menu(obj,men)
{
if(men.style.display=="")
{
men.style.display="none";
}
else
{
men.style.display="";
}
}
</script>
</head>
<body>
<table >
<tr>
<td id="t1" onclick="menu(this,Td9)"><span>新闻管理</span></td>
</tr>
<tr>
<td id="Td9" class="sec_menu" style="display: none">
<table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20">
新闻列表 | 添加</td>
</tr>
<tr>
<td height="20">
新闻首页_图片轮转
</td>
</tr>
<tr>
<td height="20">
新闻首页_热点新闻
</td>
</tr>
<tr>
<td height="20">
新闻首页_焦点
</td>
</tr>
<tr>
<td height="20">
新闻首页_展会
</td>
</tr>
<tr>
<td height="20">
新闻首页_图片新闻
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="t2" onclick="menu(this,t10)"><span>图片管理</span></td>
</tr>
<tr>
<td id="t10" style="display:none">
<table>
<tr>
<td>添加图片</td>
</tr>
<tr>
<td>修改图片</td>
</tr>
<tr>
<td>删除图片</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>