折叠菜单 - Switch Menu

Step 1: Insert the below code to the of your page:
引用内容 引用内容




Step 2: And herein lies the HTML code for the menu itself. Add the below where you want the menu to appear on your page:
引用内容 引用内容



    
    
        - What's New

        - What's hot

        - Revised Scripts

        - More Zone
    


    
    
        - Usage Terms

        - DHTML FAQs

        - Scripts FAQs
    


    
    
        - Coding Forums

    

    
    
    
        - Javascript Kit

        - Freewarejava

        - Cool Text

        - Google.com
    


    

    
        - Link to DD

        - Recommend Us

        - Email Us

    



Customization

So you're now wondering how flexible the script is when it comes to customizing the menu to your liking. The good news is, quite.

Physical changes (adding/deleting items) to the menu are all done in the code of Step 2. Study it for a while, and you'll soon see the required structure. All menu items must be added within the "masterdiv' DIV. For each item, wrap the containing links in a SPAN tag with a unique incrementing ID starting with "sub1", (ie: "sub1", "sub2" etc), and use this ID within the onClick event handler to expand/contract it. As you can see in the demo, an image can be used for the menu item itself instead of plain text.

To make cosmetic changes to the menu, it is recommended you do so via CSS, by editing the style sheet of Step 1.

Enjoy this fully DOMesticated script!
[本日志由 parno 于 2018-09-24 11:04 AM 更新]
上一篇: 如何用ASP生成RSS订阅(XML数据文档)
下一篇: KB939372 KB939373 导致 Internet 信息服务(IIS)无法启动
文章来自: 网络
引用通告: 查看所有引用 | 我要引用此文章
Tags: javascript CSS
相关日志:
评论: 0 | 引用: 0 | 查看次数: 7443