首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

这是一个菜单,有人能帮小弟我改成点击一个其他都收起来而不是现在的只有点自己才收回

2012-04-03 
这是一个菜单,有人能帮我改成点击一个其他都收起来而不是现在的只有点自己才收回%@LANGUAGE VBSCRIPT

这是一个菜单,有人能帮我改成点击一个其他都收起来而不是现在的只有点自己才收回
<%@LANGUAGE= "VBSCRIPT "   CODEPAGE= "936 "%>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN "   "http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> 无标题文档 </title>
</head>

<body>

<table   cellspacing= "0 "   cellpadding= "0 "   width= "158 "   align= "center ">

            <td   id= "imgmenu2 "   class= "menu_title "   onMouseOver= "this.className= 'menu_title2 '; "   onClick= "showsubmenu(2) "   onMouseOut= "this.className= 'menu_title '; "   style= "cursor:hand "   background= "image/menudown.gif "   height= "25 ">  
            公司简介 </td>
</tr>
<tr>
<td   id= "submenu2 "   style= "DISPLAY:   none ">
<div   class= "sec_menu "   style= "WIDTH:   158px ">

                <table   cellspacing= "3 "   cellpadding= "0 "   width= "130 "   align= "center ">
                   
                   
                    <tr>  
                        <td> <a   href= "Manage_culture.asp "   target= "main "> 企业文化 </a> </td>
                    </tr>
                    <tr>  
                        <td> <a   href= "Manage_cultureNewsAdd.asp "   target= "main "> 企业文化 </a> </td>
                    </tr>
                 
                </table>
</div>
<br>
</td>
</tr>



 




<!--tr>

        <td   id= "imgmenu5 "   class= "menu_title "   onMouseOver= "this.className= 'menu_title2 '; "   onClick= "showsubmenu(5) "   onMouseOut= "this.className= 'menu_title '; "   style= "cursor:hand "   background= "image/menudown.gif "   height= "25 ">  
            <span> 会员管理   </span> </td>
</tr>
<tr>
<td   id= "submenu5 "   style= "DISPLAY:   none ">
<div   class= "sec_menu "   style= "WIDTH:   158px ">
<table   cellspacing= "3 "   cellpadding= "0 "   width= "130 "   align= "center ">


<tr>
                        <td> <a   target= "main "   href= "UserManage.asp "> <font   color= "000000 "> 注册会员管理 </font> </a> </td>
                    </tr>
</table>
</div>
<br>
</td>
</tr-->

<tr>

        <td   id= "imgmenu6 "   class= "menu_title "   onMouseOver= "this.className= 'menu_title2 '; "   onClick= "showsubmenu(6) "   onMouseOut= "this.className= 'menu_title '; "   style= "cursor:hand "   background= "image/menudown.gif "   height= "25 ">  
            <span> 产品简介 </span> </td>
</tr>
<tr>
<td   id= "submenu6 "   style= "DISPLAY:   none ">
<div   class= "sec_menu "   style= "WIDTH:   158px ">

                <table   cellspacing= "3 "   cellpadding= "0 "   width= "130 "   align= "center ">
                    <tr>  
                        <td>   <a   href= "News_add.asp "   target= "main "> 产品A </a> </td>
                    </tr>
                    <tr>  
                        <td> <a   href= "News_add.asp "   target= "main "> 产品A </a> </td>
                    </tr>
                    <tr>  
                        <td> <a   href= "News_add.asp "   target= "main "> 产品A </a> </td>
                    </tr>
                </table>
</div>
<br>
</td>
</tr>
<tr>
        <td   id= "imgmenu14 "   class= "menu_title "   onMouseOver= "this.className= 'menu_title2 '; "   onClick= "showsubmenu(14) "   onMouseOut= "this.className= 'menu_title '; "   style= "cursor:hand "   background= "image/menudown.gif "   height= "25 ">  
            <span> 留言管理   </span> </td>
</tr>
<tr>
<td   id= "submenu14 "   style= "DISPLAY:   none ">
<div   class= "sec_menu "   style= "WIDTH:   158px ">
<table   cellspacing= "3 "   cellpadding= "0 "   width= "130 "   align= "center ">
<tr>


<td> <a   target= "main "   href= "remark.asp "> <font   color= "000000 "> 留言查看 </font> </a> </td>
                    </tr>
</table>
</div>
<br>
</td>
</tr>


</table>
</div>
<br>
</td>
</tr>


</table>
&nbsp;

</div>
<script>

function   aa(Dir)
{tt.doScroll(Dir);Timer=setTimeout( 'aa( " '+Dir+ ' ") ',100)}//这里100为滚动速度
function   StopScroll(){if(Timer!=null)clearTimeout(Timer)}

function   initIt(){
divColl=document.all.tags( "DIV ");
for(i=0;   i <divColl.length;   i++)   {
whichEl=divColl(i);
if(whichEl.className== "child ")whichEl.style.display= "none ";}
}
function   expands(el)   {
whichEl1=eval(el+ "Child ");
if   (whichEl1.style.display== "none "){
initIt();
whichEl1.style.display= "block ";
}else{whichEl1.style.display= "none ";}
}
var   tree=   0;
function   loadThreadFollow(){
if   (tree==0){
document.frames[ "hiddenframe "].location.replace( "LeftTree.asp ");
tree=1
}
}

function   showsubmenu(sid)
{
whichEl   =   eval( "submenu "   +   sid);
imgmenu   =   eval( "imgmenu "   +   sid);
if   (whichEl.style.display   ==   "none ")
{
eval( "submenu "   +   sid   +   ".style.display=\ "\ "; ");
imgmenu.background= "image/menuup.gif ";
}
else
{
eval( "submenu "   +   sid   +   ".style.display=\ "none\ "; ");
imgmenu.background= "image/menudown.gif ";
}
}

function   loadingmenu(id){
var   loadmenu   =eval( "menu "   +   id);
if   (loadmenu.innerText== "Loading... "){
document.frames[ "hiddenframe "].location.replace( "LeftTree.asp?menu=menu&id= "+id+ " ");
}
}
top.document.title= "企业网站管理系统 ";  
</script>
</body>
</html>
这是一个菜单,有人能帮我改成点击一个其他都收起来而不是现在的只有点自己才收回

[解决办法]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 无标题文档 </title>
</head>

<body>

<table cellspacing= "0 " cellpadding= "0 " width= "158 " align= "center ">

<td id= "imgmenu2 " class= "menu_title " onMouseOver= "this.className= 'menu_title2 '; " onClick= "showsubmenu(2,14) " onMouseOut= "this.className= 'menu_title '; " style= "cursor:hand " background= "image/menudown.gif " height= "25 ">
公司简介 </td>
</tr>
<tr>
<td id= "submenu2 " style= "DISPLAY: none ">
<div class= "sec_menu " style= "WIDTH: 158px ">



<table cellspacing= "3 " cellpadding= "0 " width= "130 " align= "center ">


<tr>
<td> <a href= "Manage_culture.asp " target= "main "> 企业文化 </a> </td>
</tr>
<tr>
<td> <a href= "Manage_cultureNewsAdd.asp " target= "main "> 企业文化 </a> </td>
</tr>

</table>
</div>
<br>
</td>
</tr>








<!--tr>

<td id= "imgmenu5 " class= "menu_title " onMouseOver= "this.className= 'menu_title2 '; " onClick= "showsubmenu(5,14) " onMouseOut= "this.className= 'menu_title '; " style= "cursor:hand " background= "image/menudown.gif " height= "25 ">
<span> 会员管理 </span> </td>
</tr>
<tr>
<td id= "submenu5 " style= "DISPLAY: none ">
<div class= "sec_menu " style= "WIDTH: 158px ">
<table cellspacing= "3 " cellpadding= "0 " width= "130 " align= "center ">
<tr>
<td> <a target= "main " href= "UserManage.asp "> <font color= "000000 "> 注册会员管理 </font> </a> </td>
</tr>
</table>
</div>
<br>
</td>
</tr-->

<tr>

<td id= "imgmenu6 " class= "menu_title " onMouseOver= "this.className= 'menu_title2 '; " onClick= "showsubmenu(6,14) " onMouseOut= "this.className= 'menu_title '; " style= "cursor:hand " background= "image/menudown.gif " height= "25 ">
<span> 产品简介 </span> </td>
</tr>
<tr>
<td id= "submenu6 " style= "DISPLAY: none ">
<div class= "sec_menu " style= "WIDTH: 158px ">

<table cellspacing= "3 " cellpadding= "0 " width= "130 " align= "center ">
<tr>
<td> <a href= "News_add.asp " target= "main "> 产品A </a> </td>
</tr>
<tr>
<td> <a href= "News_add.asp " target= "main "> 产品A </a> </td>
</tr>
<tr>
<td> <a href= "News_add.asp " target= "main "> 产品A </a> </td>
</tr>
</table>
</div>
<br>
</td>
</tr>
<tr>
<td id= "imgmenu14 " class= "menu_title " onMouseOver= "this.className= 'menu_title2 '; " onClick= "showsubmenu(14,14) " onMouseOut= "this.className= 'menu_title '; " style= "cursor:hand " background= "image/menudown.gif " height= "25 ">
<span> 留言管理 </span> </td>
</tr>
<tr>
<td id= "submenu14 " style= "DISPLAY: none ">
<div class= "sec_menu " style= "WIDTH: 158px ">


<table cellspacing= "3 " cellpadding= "0 " width= "130 " align= "center ">
<tr>
<td> <a target= "main " href= "remark.asp "> <font color= "000000 "> 留言查看 </font> </a> </td>
</tr>
</table>
</div>
<br>
</td>
</tr>


</table>
</div>
<br>
</td>
</tr>


</table>
&nbsp;

</div>
<script>

function aa(Dir)
{tt.doScroll(Dir);Timer=setTimeout( 'aa( " '+Dir+ ' ") ',100)}//这里100为滚动速度
function StopScroll(){if(Timer!=null)clearTimeout(Timer)}

function initIt(){
divColl=document.all.tags( "DIV ");
for(i=0; i <divColl.length; i++) {
whichEl=divColl(i);
if(whichEl.className== "child ")whichEl.style.display= "none ";}
}
function expands(el) {
whichEl1=eval(el+ "Child ");
if (whichEl1.style.display== "none "){
initIt();
whichEl1.style.display= "block ";
}else{whichEl1.style.display= "none ";}
}
var tree= 0;
function loadThreadFollow(){
if (tree==0){
document.frames[ "hiddenframe "].location.replace( "LeftTree.asp ");
tree=1
}
}

function showsubmenu(sid,allid)
{
if (allid> 0)
{
for (var k=0;k <=allid ;k++ )
{
var o=document.getElementById( "submenu " + k);
if (o)
{
eval( "submenu " + k + ".style.display=\ "none\ "; ");
}
}

}
whichEl = eval( "submenu " + sid);
imgmenu = eval( "imgmenu " + sid);
if (whichEl.style.display == "none ")
{
eval( "submenu " + sid + ".style.display=\ "\ "; ");
imgmenu.background= "image/menuup.gif ";
}
else
{
eval( "submenu " + sid + ".style.display=\ "none\ "; ");
imgmenu.background= "image/menudown.gif ";
}
}

function loadingmenu(id){
var loadmenu =eval( "menu " + id);
if (loadmenu.innerText== "Loading... "){
document.frames[ "hiddenframe "].location.replace( "LeftTree.asp?menu=menu&id= "+id+ " ");
}
}
top.document.title= "企业网站管理系统 ";
</script>
</body>
</html>

热点排行