我怎样才能在这里得到一个子菜单? [英] How can i get a submenu here?

查看:98
本文介绍了我怎样才能在这里得到一个子菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个网站atm,现在我们得到了一个子菜单,它放在主菜单下的一行中。但是我们决定制作一个可以折叠的子菜单,如果你把主要的手工物品放在上面。把它放在这里 http://www.nvidia.de/page/home.html

 <! -  main-menu start  - > 
< div id =menu>
< ul class =menu>
< li>< a href =index.html>< span>主页< / span>< / a>< / li>
< a>< a class =activehref =events.html>< span>活动< / span>< / a>< / li>
< ul> <李> < a class =submenuhref =#> Umfrage< / a> < /锂> < / UL>
< li>< a href =galerie.html>< span> Galerie< / span>< / a>< / li>
< li>< a href =locations.html>< span>位置< / span>< / a>< / li>
< li>< a href =tanzschulen.html>< span> Tanzschulen< / span>< / a>< / li>
< li>< a href =festivals.html>< span>节日< / span>< / a>< / li>
< li>< a href =reisen.html>< span> Reisen< / span>< / a>< / li>
< li>< a href =community.html>< span>社区< / span>< / a>< / li>
< / ul>
< / div>
<! - 主菜单结束 - >

<! - 子菜单开始 - >
< script type =text / javascript>
函数openwindow(){
window.open(./loginpage.php\",\"openwindowname\",\"width=350,height=150,scrollbars=no,resizable=no,toolbar=no, location = no,directories = no,status = no,menu bar = no,copyhistory = no,);
}
function closewindow(){
window.close()
}
< / script>

< div id =submenu>
< ul class =submenu>
< li>< a href =#> Umfragen< / a>< / li>
< li class =login-logout>< a href =registrieren.html> Registrieren< / a> | < a href =#openModal>登入< / a>< / li>
< div id =openModalclass =modalDialog>
< div>
< a href =#closetitle =Closeclass =close> X< / a>
< h2>登入< / h2>
< form action =>
< table border =0cellpadding =3cellspacing =0>
< tr>< td class =first>电子邮件< / td>< td>< input name =nametype =textsize =30placeholder =电子邮件>< / TD>< / TR>
< tr>< td class =first> Passwort< / td>< td>< input name =emailtype =textsize =30placeholder =Passwort >< / TD>< / TR>
< td class =col_1 col_last>< div style =margin-top:12pxclass =checkbox_container>< input type =checkboxname =autologinid = autologinvalue =1class =checkbox> < label for =autologin> Angemeldet bleiben< / label>< / div>< / td>
< / tr>
< / table>
< / form>
< div class =send-button2>
< label class =party ui-button ui-widget ui-state-default ui-button-text-only ui-corner-leftrole =button>< span class =ui-按钮文字>< a href =#closetitle =关闭>登入< / a>< / span>< / label>
< / div>
< / div>
< / div>
< / ul>
< / div>
<! - 子菜单结束 - >

这就是它的外观,我真的不知道如何在那里得到这样的子菜单。有人可以帮我一下吗?

解决方案

最简单的方法是使用jQuery UI菜单部件:



http://jqueryui.com/menu/


i am writing a website atm and for now we got a submenu which is placed in a line under the main menu. But we decided to make a submenu that folds down if you hover the main manu items. lile its here http://www.nvidia.de/page/home.html

<!-- main-menu start -->
            <div id="menu">
                <ul class="menu">
                    <li><a href="index.html"><span>Home</span></a></li>
                    <li><a class="active" href="events.html"><span>Events</span></a></li>
                        <ul> <li> <a class="submenu" href="#"> Umfrage </a> </li> </ul>
                    <li><a href="galerie.html"><span>Galerie</span></a></li>
                    <li><a href="locations.html"><span>Locations</span></a></li>
                    <li><a href="tanzschulen.html"><span>Tanzschulen</span></a></li>
                    <li><a href="festivals.html"><span>Festivals</span></a></li>
                    <li><a href="reisen.html"><span>Reisen</span></a></li>
                    <li><a href="community.html"><span>Community</span></a></li>
                </ul>
            </div>
            <!-- main-menu end -->

            <!-- sub-menu start -->
            <script type="text/javascript">
                function openwindow() {
                window.open ("./loginpage.php","openwindowname","width=350,height=150,scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=no,menu  bar=no,copyhistory=no,");
                                        }
                        function closewindow() {
                        window.close()
                                                }
            </script>

            <div id="submenu">
                <ul class="submenu">
                    <li><a href="#">Umfragen</a></li>
                    <li class="login-logout"><a href="registrieren.html">Registrieren</a> | <a href ="#openModal">Login</a></li>
                    <div id="openModal" class="modalDialog">
                        <div>
                            <a href="#close" title="Close" class="close">X</a>
                            <h2>Login</h2>
                            <form action="">
                                            <table border="0" cellpadding="3" cellspacing="0">
                                                <tr><td class="first">E-Mail</td><td><input name="name" type="text" size="30" placeholder="E-Mail"></td></tr>
                                                <tr><td class="first">Passwort</td><td><input name="email" type="text" size="30" placeholder="Passwort"></td></tr>
                                                <td class="col_1 col_last"><div style="margin-top: 12px" class="checkbox_container"><input type="checkbox" name="autologin" id="autologin" value="1" class="checkbox"> <label for="autologin">Angemeldet bleiben</label></div></td>
                                                </tr>
                                            </table>
                                        </form>
                                        <div class="send-button2">
                                            <label class="party ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" role="button"><span class="ui-button-text"><a href="#close" title="Close">Login</a></span></label>                                         
                                        </div>
                        </div>
                    </div>
                </ul>
            </div>
            <!-- sub-menu end -->

thats how it looks so far, and i really have no idea how to get such a submenu there. Can someone help me a bit with this?

解决方案

The easiest way is to use the jQuery UI Menu widget:

http://jqueryui.com/menu/

这篇关于我怎样才能在这里得到一个子菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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