zoukankan      html  css  js  c++  java
  • 树形菜单

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <title>树形菜单</title>
        <style>
            body {
                font: 12px/20px 宋体;
            }
    
            img {
                vertical-align: center;
                border: none;
            }
    
            a {
                text-decoration: none;
                color: #000;
            }
    
            li {
                list-style: none;
            }
        </style>
        <script>
            function onclickfclose(id) {
                var ul = document.getElementById(id);
                var objv = ul.style.display;
                if (objv == 'none') {
                    ul.style.display = 'block'
                } else {
                    ul.style.display = 'none';
                }
            }
    
    
        </script>
    </head>
    <body>
    <b><img src="images/fold.gif" alt=""/>树形菜单</b>
    <ul>
        <a href="javascript:onclickfclose('art')"><img src="images/fclose.gif" alt=""/>文学艺术</a>
    </ul>
    <ul id="art" style="display: none;">
        <li><img src="images/doc.gif" alt=""/>著名小说</li>
        <li><img src="images/doc.gif" alt=""/>著名小说</li>
        <li><img src="images/doc.gif" alt=""/>著名小说</li>
        <li><img src="images/doc.gif" alt=""/>著名小说</li>
    </ul>
    <ul>
        <a href="javascript:onclickfclose('fangc')"><img src="images/fclose.gif" alt=""/>房产论坛</a>
    </ul>
    <ul id="fangc" style="display: none;">
        <li><img src="images/doc.gif" alt=""/>房产推销</li>
        <li><img src="images/doc.gif" alt=""/>房产推销</li>
        <li><img src="images/doc.gif" alt=""/>房产推销</li>
        <li><img src="images/doc.gif" alt=""/>房产推销</li>
    </ul>
    <ul>
        <a href="javascript:onclickfclose('tuhua')"><img src="images/fclose.gif" alt=""/>提图专区</a>
    </ul>
    <ul id="tuhua" style="display: none" ;>
        <li><img src="images/doc.gif" alt=""/>风景图画</li>
        <li><img src="images/doc.gif" alt=""/>风景图画</li>
        <li><img src="images/doc.gif" alt=""/>风景图画</li>
        <li><img src="images/doc.gif" alt=""/>风景图画</li>
    </ul>
    <ul>
        <a href="javascript:onclickfclose('bagua')"> <img src="images/fclose.gif" alt=""/>娱乐八卦</a>
    </ul>
    <ul id="bagua" style="display: none" ;>
        <li><img src="images/doc.gif" alt=""/>明星采访</li>
        <li><img src="images/doc.gif" alt=""/>明星采访</li>
        <li><img src="images/doc.gif" alt=""/>明星采访</li>
        <li><img src="images/doc.gif" alt=""/>明星采访</li>
    </ul>
    </body>
    </html>
  • 相关阅读:
    在vs 2012 中使用xna 4.0 做开发!
    MVC如何分离Controller与View在不同的项目?
    Shader Compilation for Multiple Platforms
    文件已损坏,请移至废纸篓的解决办法!
    javascript学习笔记[6]面向对象
    javascript学习笔记[3]流程控制
    [tonyLp]百度地图API开发实践(1)
    javascript学习笔记[7]内建对象
    javascript学习笔记[5]函数(2)
    javascript学习笔记[1]变量
  • 原文地址:https://www.cnblogs.com/lwj820876312/p/7058597.html
Copyright © 2011-2022 走看看