JavaScript dtree:javascript-Tree menu Dtree

Source: Internet
Author: User
Tags add object

JS code is very concise, but the implementation of all the tree menu should have the function, installation and use is very simple, especially from the database to restore a tree becomes very easy. Download the package with some of the most common icons, just a simple operation, you can achieve a very professional looking tree menu.

Introduce application Dtree to build a JavaScript tree menu and its parameter configuration description
I wrote a website these days.
, with a tree-style menu written in JavaScript, some netizens asked me to this code, very strange, to understand, the original online a lot of articles are discussed in the JS tree menu, see a few examples, found that I do not use this good, so Baidu a bit, slightly sorted out, I hope we do not waste no effort.

First of all, I use this JS-tree menu, I do not do is a foreigner wrote---dtree.
This infinite class can refresh the JS-tree menu Dtree
1, can set the unlimited level menu
2, do not use the framework
3, can refresh, multi-page jump will not affect the menu
4, can limit the level of creation of the subtree
5, support the current mainstream browser: ie5,6,7
6, the node picture can set toggle picture effect
Unzip the Dtree.zip package.
These files are included in the Dtree directory: example01.html, Dtree.js, api.html, DTREE.CSS, and IMG directories
Note: All other files must be copied except for the api.html. Api.html is an introduction to Dtree's functions.
Open example01.html File
<link rel= "stylesheet" href= "Css/dtree.css" type= "Text/css"/>
<script type= "Text/javascript" src= "Js/dtree.js" ></script>
Two files that must be referenced.
To generate the code for the tree node:
<script type= "Text/javascript" >
<!--
D = new Dtree (' d ');//Create a Tree object
D.add (0,-1, ' My example tree '); Create a Tree object
D.add (1,0, ' Node 1 ', ' example01.html ');
D.add (2,0, ' Node 2 ', ' example01.html ');
D.add (3,1, ' node 1.1 ', ' example01.html '); This article links http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20120604/27951.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.