Download a dtree. The application is as follows:
<% @ Page contenttype = "text/html; charset = gb2312" %>
<% @ Page Language = "Java" %>
<% @ Page import = "Java. util. *" %>
<% @ Page import = "Java. SQL. *" %>
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 strict // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<Head>
<Title> dtree view </title>
<LINK rel = "stylesheet" href = "dtree.css" type = "text/CSS"/>
<SCRIPT type = "text/JavaScript" src = "dtree. js"> </SCRIPT>
<Input type = hidden name = selid ID id = selid>
<Br>
</Head>
<Body>
<H3> System <Table>
<Div class = "dtree">
<P>
<A href = "javascript: D. openall ();"> Expand All </a>
Zookeeper
<A href = "javascript: D. closeall ();"> hide all </a>
</P>
<SCRIPT type = "text/JavaScript">
D = new dtree ('D ');
D. Add ("root0",-1, 'system', 'pages/treejs. jsp '); // Add the root node
D. add ("root1", "root0", 'Central device', 'pages/treejs. JSP ', '','', 'images/cd.gif', 'images/cd.gif '); add subnodes
Document. Write (d); // The output shows a tree chart.
</SCRIPT>
</Div>
</Table>
</Body>
</Html>
Real data can be read from the database and added to the node. You can modify it as needed.