菜单和子菜单的问题 [英] problem with menus and submenu

查看:64
本文介绍了菜单和子菜单的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了menus.如何在菜单中创建子菜单.我使用了以下代码来创建菜单.

I have created menus.how to create submenus into menus..i used following code for creating menus.

<ul id="sddm">    <li><a href="#"
        onmouseover="mopen('m4')" 
         önmouseout="mclosetime()">Posting Management>></a>
        <div id="m4" 
            onmouseover="mcancelclosetime()" 
             önmouseout="mclosetime()">
        <a href="#" >Institute>></a>
        <a href="#">Company</a>
        <a href="#">Consultant</a>
        <a href="#">Brand</a>
        </div>
        </li></ul>



现在,我必须将子菜单添加到Institute.how如何添加plz帮助我.



now,i have to add submenu into institute.how to add plz help me.

推荐答案

<ul id="sddm">
   <li><a href='#'><span>Posting Management</span></a></li>
   <li><a href='#'><span>Institute</span></a>
      <ul>
         <li><a href='#'><span>Item 1</span></a></li>
         <li><a href='#'><span>Item 2</span></a></li>
      </ul>
   </li>
</ul>



如果您仅使用JavaScript来显示和隐藏子菜单,则可以采用纯CSS路由方式.您可以通过搜索Pure CSS菜单找到更多信息.有很多CSS菜单制作器 [ ^ ]在那里,您也可以签出.

如果您希望采用JavaScript方式,则只需更新代码即可显示和隐藏内部的< ul> ...</li>.

希望对您有所帮助.



If you are using the JavaScript purely to show and hide sub menus then you can go a pure CSS route way. You can find out more by searching for Pure CSS menus. There are quite a few CSS Menu Makers [^] out there which you can check out also.

If you wish to go the JavaScript way, you will just need to update your code to show and hide the inner <ul>...</li>.

I hope this helps.


这篇关于菜单和子菜单的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆