JSベースのツリーガイドの実現


ネット上でJSの木の形のナビゲーションを探して、まずそのjsカバンをダウンロードして、それからプロジェクトの中に置いて、やっと使うことができて、小さい例をして、予備を残しています。
 
ページのファイルはそのjsパッケージの共通の上位フォルダに置くべきです。でないと、画像が見つかりません。
 
サンプルコード:
フロント:
<%@@Page Language=「C啱」AutoEvent Wireup=「true」CodeBehind=「showTree.aspx.cs」Inheritys=「WebAppliations.Tree.showTree」%><!DOCTYPE.PUBLIC"-//W 3 C//DT XHTML 1.0 Transitional/EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"<>xmlns="http://www.w3.org/1999/xhtml">
すべての展開を展開します。h ref=「javascript:d.closeAll()」>全部をまとめます。d=new dTree('d')//グローバル変数(%){$getJSON("Tree Json.asx"、"、"、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、///、JSONオブジェクトを遍歴します!、{d.Inders]、{d.Intree]、//ルートノードはforを追加します。http://www.baidu.com/')//前の二つのパラメータは整数であること。)innerHTML=d;)//-
>
 
バックグラウンドはJSON JSを返してデータを読み込みます。
 
そのJSTreeについて、以下のように紹介します。
 
tree.add(id,pid,name,url,title,target,icon,iconOpen,open)について;方法中のパラメータはここで説明する必要があります。
パラメータ
 Name
 Type
 Description
 id
 Number
 Unique identity number.
 pid
 Number
Number refering to the parent node.The value for the root node has to   be-1.
 name
 String
 Text label for the node.
 url
 String
 Url for the node.
 title
 String
 Title for the node.
 タージ
 String
 Target for the node.
 icon
 String
 Image file to use as the icon.Uses default if not specified.
 iconOpen
 String
 Image file to use as the open icon.Uses default if not specified
 open
 ボロア
 Is the node open.
Example
mytree.add(1, 0, 'My node', 'node.html', 'node title', 'mainframe', 'img/musicfolder.gif');
は、上でdtree appiから引用された説明であり、以下に翻訳後の説明である。
id:ノード自体のid
pid:ノードの親ノードのid
name:ノードがページに表示する名前
url:ノードのリンク先
title:ノードにマウスを置くと表示されるメッセージ
ターゲット:ノードリンクが開いているターゲットframe(フレームターゲットmanFrameやau blank、au selfなど)
icon:ノードクローズ時の表示画像の経路
iconOpen:ノードオープン時の表示画像の経路
open
:ブール型、ノードが開くかどうか(デフォルトはfalse)
参考サイト: 
http://blog.sina.com.cn/s/blog_59 d 6717 c 0100 ekm 3.
http://destroydrop.com/javascripts/tree/