| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 771 人关注过本帖
标题:js二级菜单显示问题
只看楼主 加入收藏
chenjingjing
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-10-27
结帖率:0
收藏
 问题点数:0 回复次数:1 
js二级菜单显示问题
网站有8个一级菜单,前几个有二级下拉菜单显示,现在我要给后面一级菜单添加二级菜单显示出来要怎么做呢?下面是前几个一级菜单显示二级菜单的代码,我要怎么做才能实现后面的二级菜单显示出来呢?window.mm_menu_0213125629_0这对象是在哪里定义的?是什么意思呢?谢谢啊,希望能帮我解决这问题,非常感谢!!

function mmLoadMenus() {
 if (window.mm_menu_0213125629_0) return;
window.mm_menu_0213125629_0 = new Menu("root",98,25,"",12,"#FFFFFF","#EF3303","#E93504","#FEC401","center","middle",3,0,1000,-5,7,true,true,true,0,false,false);         
{aspcms:navlist type=4}      
 mm_menu_0213125629_0.addMenuItem("[navlist:name]","location='[navlist:link]'");
{/aspcms:navlist}
   mm_menu_0213125629_0.hideOnMouseOut=true;
   mm_menu_0213125629_0.bgColor='#FFFFFF';
   mm_menu_0213125629_0.menuBorder=1;
   mm_menu_0213125629_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0213125629_0.menuBorderBgColor='#E93301';
 
  window.mm_menu_0213125948_0 = new Menu("root",99,25,"",12,"#FFFFFF","#EF3303","#E93504","#FEC401","center","middle",3,0,1000,-5,7,true,true,true,0,false,false);
  {aspcms:navlist type=66}      
  mm_menu_0213125948_0.addMenuItem("[navlist:name]","location='[navlist:link]'");
  {/aspcms:navlist}
   mm_menu_0213125948_0.hideOnMouseOut=true;
   mm_menu_0213125948_0.bgColor='#FFFFFF';
   mm_menu_0213125948_0.menuBorder=1;
   mm_menu_0213125948_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0213125948_0.menuBorderBgColor='#E93301';

  window.mm_menu_0213130027_0 = new Menu("root",98,25,"",12,"#FFFFFF","#EF3303","#E93504","#FEC401","center","middle",3,0,1000,-5,7,true,true,true,0,false,false);
    {aspcms:navlist type=67}      
  mm_menu_0213130027_0.addMenuItem("[navlist:name]","location='[navlist:link]'");
  {/aspcms:navlist}
   mm_menu_0213130027_0.hideOnMouseOut=true;
   mm_menu_0213130027_0.bgColor='#FFFFFF';
   mm_menu_0213130027_0.menuBorder=1;
   mm_menu_0213130027_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0213130027_0.menuBorderBgColor='#E93301';
   
mm_menu_0213130027_0.writeMenus();


搜索更多相关主题的帖子: center return function 一级 菜单 
2012-10-27 14:41
qq942005383
Rank: 1
来 自:广东珠海
等 级:新手上路
帖 子:23
专家分:0
注 册:2012-3-23
收藏
得分:0 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{margin:0px;
  padding:0px;
  }
  
 
#menu1 li{ list-style-type:none;
           float:left;
           
           }
           
#menu1 .menu2 a{color:#000;
                 background-color:#66FFFF;
                 padding:10px 20px;
                 display:block;
                 text-decoration:none;
                  }
 
#menu1 .menu2 a:hover{
                        text-decoration:none;
                        color:#FFFFFF;
                       background-color:#F96;}
 
 
#menu1 .subb { display:none;}
</style>
</head>
 
<body>
<div  style=" width:960px; margin:0px auto; ">
 
<ul id="menu1">
<li class="menu2">
<a href="#" class="sy">首页1</a>
<dl class="subb">
<dt><a href="#">副页1</a></dt>
<dt><a href="#">副页2</a></dt>
<dt><a href="#">副页3</a></dt>
</dl>
</li>
 
<li class="menu2">
<a href="#">首页2</a>
<dl class="subb">
<dt><a href="#">副页1</a></dt>
<dt><a href="#">副页2</a></dt>
<dt><a href="#">副页3</a></dt>
</dl>
</li>
 
<li class="menu2">
<a href="#">首页3</a>
<dl class="subb">
<dt><a href="#">副页1</a></dt>
<dt><a href="#">副页2</a></dt>
<dt><a href="#">副页3</a></dt>
</dl>
</li>
 
<li class="menu2">
<a href="#" >首页4</a>
<dl class="subb">
<dt><a href="#">副页1</a></dt>
<dt><a href="#">副页2</a></dt>
<dt><a href="#">副页3</a></dt>
</dl>
</li>
 
</ul>
</div>
<script type="text/javascript">
var menu1=document.getElementById("menu1").childNodes;
 
for(var i=0; i<menu1.length;i++)
{ menu1[i].onmouseover=function(){bl(this,"block");}
  menu1[i].onmouseout=function(){bl(this,"none");}
}
function bl(a,b)
{a.getElementsByTagName("dl")[0].style.display=b;}
</script>
 
</body>
</html>


超简单的二级下拉导航代码 复制到Dreamweaver 可以用

2012-11-13 10:33
快速回复:js二级菜单显示问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.033356 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved