asp收缩栏,也就是展开栏,当点击一下的时候就展开子菜单,再点击一下的时候就收缩隐藏起来?大虾们帮帮忙
下面是代码:它默认老是展开的,我想把它变成默认是收缩的,哪位好心人帮我改一改,先谢了,问题解决后追加50分,谢谢!<SCRIPTlanguage=javascript1....
下面是代码:它默认老是展开的,我想把它变成默认是收缩的,哪位好心人帮我改一改,先谢了,问题解决后追加50分,谢谢!
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
</head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=0 cellspacing=0 width=158 align=left>
<tr>
<td height=25 align="left" background="../images/Admin_left_3.gif" class=menu_title id=menuTitle4 style="cursor:hand;" onclick="showsubmenu(4)" onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';>
<span>电影管理设置</span>←</td>
</tr>
<tr>
<td style="display:" id='submenu4'>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=left width=130>
<tr><td height=20>1<a href=../1.asp>电影详细设置</a></td></tr>
<tr><td height=20><a href=../2.asp>电影详细修改</a></td></tr>
<tr><td height=20><a href=../3.asp>3电影详细管理</a></td></tr>
<tr><td height=20><a href=../4.asp>4</a></td></tr>
<tr><td height=20><a href=../5.asp>5</a></td></tr>
</table> 展开
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
</head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=0 cellspacing=0 width=158 align=left>
<tr>
<td height=25 align="left" background="../images/Admin_left_3.gif" class=menu_title id=menuTitle4 style="cursor:hand;" onclick="showsubmenu(4)" onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';>
<span>电影管理设置</span>←</td>
</tr>
<tr>
<td style="display:" id='submenu4'>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=left width=130>
<tr><td height=20>1<a href=../1.asp>电影详细设置</a></td></tr>
<tr><td height=20><a href=../2.asp>电影详细修改</a></td></tr>
<tr><td height=20><a href=../3.asp>3电影详细管理</a></td></tr>
<tr><td height=20><a href=../4.asp>4</a></td></tr>
<tr><td height=20><a href=../5.asp>5</a></td></tr>
</table> 展开
展开全部
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
</head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=0 cellspacing=0 width=158 align=left>
<tr>
<td height=25 align="left" background="../images/Admin_left_3.gif" class=menu_title id=menuTitle4 style="cursor:hand;" onclick="showsubmenu(4)" onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';>
<span>电影管理设置</span>←</td>
</tr>
<tr>
<td style="display: none" id='submenu4'>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=left width=130>
<tr><td height=20><a href=../1.asp>1电影详细设置</a></td></tr>
<tr><td height=20><a href=../2.asp>2电影详细修改</a></td></tr>
<tr><td height=20><a href=../3.asp>3电影详细管理</a></td></tr>
<tr><td height=20><a href=../4.asp>4</a></td></tr>
<tr><td height=20><a href=../5.asp>5</a></td></tr>
</table>
好了··
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
</head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=0 cellspacing=0 width=158 align=left>
<tr>
<td height=25 align="left" background="../images/Admin_left_3.gif" class=menu_title id=menuTitle4 style="cursor:hand;" onclick="showsubmenu(4)" onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';>
<span>电影管理设置</span>←</td>
</tr>
<tr>
<td style="display: none" id='submenu4'>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=left width=130>
<tr><td height=20><a href=../1.asp>1电影详细设置</a></td></tr>
<tr><td height=20><a href=../2.asp>2电影详细修改</a></td></tr>
<tr><td height=20><a href=../3.asp>3电影详细管理</a></td></tr>
<tr><td height=20><a href=../4.asp>4</a></td></tr>
<tr><td height=20><a href=../5.asp>5</a></td></tr>
</table>
好了··
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询