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

javascript 菜单有关问题! 多谢

2012-03-18 
javascript 菜单问题! 谢谢现在的这个菜单只能2级变化有人可以改成3级的吗?htmlheadmetahttp-equiv

javascript 菜单问题! 谢谢
现在的这个菜单只能2级变化有人可以改成3级的吗?
<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   id= "imgmenu11 "   onMouseOver= "this.className= 'menu_title2 '; "   onClick= "showsubmenu(11,14) "   onMouseOut= "this.className= 'menu_title '; "   style= "cursor:hand "   background= "image/menudown.gif "   height= "25 "> 企业文化 </td>
                    </tr>
                  <tr>
<td   id= "submenu11 "   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 "> 产品s </a> </td>
                    </tr>
                </table>
</div>
<br>
</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>



</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=\ "\ "; ");
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>

[解决办法]
<table cellspacing= "0 " cellpadding= "0 " width= "158 " align= "center ">
<tr>
<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 id= "imgmenu11 " onMouseOver= "this.className= 'menu_title2 '; " onClick= "showsubmenu(11,14) " onMouseOut= "this.className= 'menu_title '; " style= "cursor:hand " background= "image/menudown.gif " height= "25 "> 企业产品 </td>
</tr>
<tr>
<td id= "submenu11 " style= "DISPLAY: none ">
<div class= "sec_menu " style= "WIDTH: 120px ">
<table cellspacing= "3 " cellpadding= "0 " width= "90 " align= "center ">
<tr>
<td> <a href= "News_add.asp " target= "main "> 产品s </a> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<br/>
</td>
</tr>
</table>
<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)
{
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>

热点排行
Bad Request.