javascript完整的下拉菜单代码

这是我开发应用中用到一个js下拉菜单效果,现在发出来希望给更多的朋友帮助。

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>无标题页</title>
</head>
<body>
    <table width="258" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td width="258" height="432" valign="top" background="images/left.jpg">
                <table width="258" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="26" valign="top" background="images/ss.jpg">
                            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="13%" height="19">
                                        &nbsp;</td>
                                    <td width="87%" valign="bottom">
                                        <strong>产品类别</strong></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <table width="82%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <%-- /**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-   /**/--%>
                    <tr style="cursor: hand;" onclick="document.all.c1.style.display=(document.all.c1.style.display=='none')?'':'none'">
                        <td width="10%" align="center" valign="middle" class="border2">
                            <img src="images/biao.jpg" width="3" height="5" /></td>
                        <td width="90%" height="30" align="left" valign="middle" class="border2">
                            <strong>食品加工</strong></td>
                    </tr>
                    <tr id="c1" style="display: none; line-height: 24px;">
                        <td width="10%" align="center" valign="middle" class="border2">
                        </td>
                        <td width="90%" height="30" align="left" valign="middle">
                            <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top: 2px;">
                                <tr>
                                    <td>
                                        食品加工1
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        食品加工2
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        食品加工3
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <%-- /**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-   /**/--%>
                    <tr style="cursor: hand;" onclick="document.all.c2.style.display=(document.all.c2.style.display=='none')?'':'none'">
                        <td align="center" valign="middle" class="border2">
                            <img src="images/biao.jpg" width="3" height="5" /></td>
                        <td height="30" align="left" valign="middle" class="border2">
                            <strong>食品加工类</strong></td>
                    </tr>
                    <tr id="c2" style="display: none; line-height: 24px;">
                        <td width="10%" align="center" valign="middle" class="border2">
                        </td>
                        <td width="90%" height="30" align="left" valign="middle">
                            <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top: 2px;">
                                <tr>
                                    <td>
                                        食品加工类1
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        食品加工类2
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        食品加工类3
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <%-- /**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-/**/-   /**/--%>
                    <tr style="cursor: hand;" onclick="document.all.c3.style.display=(document.all.c3.style.display=='none')?'':'none'">
                        <td align="center" valign="middle" class="border2">
                            <img src="images/biao.jpg" width="3" height="5" /></td>
                        <td height="30" align="left" valign="middle" class="border2">
                            <strong>坚果加工类</strong></td>
                    </tr>
                    <tr id="c3" style="display: none; line-height: 24px;">
                        <td width="10%" align="center" valign="middle" class="border2">
                        </td>
                        <td width="90%" height="30" align="left" valign="middle">
                            <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top: 2px;">
                                <tr>
                                    <td>
                                        坚果加工类1 </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        坚果加工类2 </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        坚果加工类3 </a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

时间: 2024-10-07 13:35:56

javascript完整的下拉菜单代码的相关文章

jquery实现漂亮的二级下拉菜单代码_jquery

本文实例讲述了jquery实现漂亮的二级下拉菜单代码.分享给大家供大家参考.具体如下: 这里介绍一款基于jquery实现的网站下拉菜单,黑色风格,很漂亮,本菜单需要点击主菜单后的小三角符号才下拉出二级菜单,并不是有些菜单,是鼠标移上主菜单的时候就滑过,至于哪一种,就看个人的喜好了 先来看看运行效果: 在线演示地址如下: http://demo.jb51.net/js/2015/jquery-bg-2-level-down-show-menu-codes/ 具体代码如下: <!DOCTYPE ht

jQuery实现带动画效果的多级下拉菜单代码_jquery

本文实例讲述了jQuery实现带动画效果的多级下拉菜单代码.分享给大家供大家参考.具体如下: 这是一款基于jQuery实现的多级下拉菜单,带动画效果,所有的元素以ul li ul li ul li的循环格式嵌套 如果没有下级分类 就用li a结束嵌套,代码内不用toggle()的原因是为了在收缩菜单的时候同时也将该菜单的下级菜单以后的所有元素都隐藏. 运行效果截图如下: 在线演示地址如下: http://demo.jb51.net/js/2015/jquery-animate-style-dow

使用Javascript实现选择下拉菜单互移并排序_jquery

本文给大家介绍使用js实现下拉菜单可选择互相移动并实现菜单排序,代码简单易懂,具有参考价值,先给大家展示下效果图,感觉还很满意请参考本段代码. 代码如下: <html> <head> <title>使用Javascript实现选择下拉菜单互移并排序</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <

纯CSS导航条下拉菜单代码

提示:您可以先修改部分代码再运行 纯CSS导航条下拉菜单代码 Home Single Level Dropdown Dropline Flyout Support Contact 提示:您可以先修改部分代码再运行

css 下拉菜单代码

提示:您可以先修改部分代码再运行 css 下拉菜单代码 Home Single Level Dropdown Dropline Flyout Support Contact 提示:您可以先修改部分代码再运行

导航下拉菜单 代码

提示:您可以先修改部分代码再运行 导航下拉菜单 代码 大类1 没有小类了 大类2 没有小类 大类3 没有小类 大类4 没有小类 提示:您可以先修改部分代码再运行

js 导航栏下拉菜单代码

提示:您可以先修改部分代码再运行 js 导航栏下拉菜单代码 Home Single Level Dropdown Dropdown one Dropdown 1.1 Dropdown 1.2 Dropdown 1.3 Dropdown 1.4 Dropdown 1.5 Dropdown 1.6 Dropdown two Dropdown 2.1 Dropdown 2.2 Dropdown 2.3 Dropdown 2.4 Dropdown 2.5 Dropdown three Dropdown

JavaScript模拟下拉菜单代码_表单特效

JavaScript模拟下拉菜单,做的仓促,虚心接受批评. 请选择19881989请选择年份 性别男女请选择性别 幼儿班小学初中请选择学历

使用 JavaScript 创建 FrontPage 下拉菜单

frontpage|javascript|菜单|创建|下拉 摘要: 当您在 Internet 上进行浏览时,到处都在使用各种类型的下拉菜单,但如果您曾经尝试创建过一种类型的下拉菜单的话,就会了解此过程可能并非总是非常简单.本文解释了创建您自己的下拉菜单所需的脚本和样式. 下拉菜单简介 Internet 上几乎每个站点都存在某种种类的下拉菜单.您可能会发现,简单的下拉菜单会在网页的上部水平排列,复杂些的会级联子菜单,有些使用带有鼠标停留效果的图形,还有一些在网页的左侧或右侧竖直排列.如果您想过在自