關(guān)于js樹(shù)的雜記
Posted on 2008-11-19 14:33 leekiang 閱讀(460) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): web開(kāi)發(fā)改造xloadtree,改成json傳參和jquery插件的方式
數(shù)據(jù),結(jié)構(gòu),行為,風(fēng)格
xloadtree:
樹(shù)的數(shù)據(jù)是以xml的結(jié)構(gòu)存放的。
每次點(diǎn)擊展開(kāi)的圖標(biāo),只加載下一級(jí)的數(shù)據(jù)。
每一級(jí)的數(shù)據(jù)都是以<xml>的形式存放,
<tree text="子節(jié)點(diǎn)" action="http://webfx.eae.net" src="NOT_AVAILABLE.xml" target="_new"
?? ??? ?icon="http://webfx.eae.net/images/favicon.gif"/>
?? ??? ?如果src形如*.xml,該節(jié)點(diǎn)的前面才有展開(kāi)的圖標(biāo)。
文件系統(tǒng)樹(shù),如果不作調(diào)整,最后一個(gè)節(jié)點(diǎn)不管是文件夾還是文件,一律顯示為文件,這是不對(duì)的,如何處理:
(1)設(shè)置葉子圖標(biāo)為folder.png
(2)生成下一級(jí)的xml數(shù)據(jù)時(shí)判斷一下,如果子級(jí)有文件夾或文件,則src形如*.xml;如果是文件,加一個(gè)icon='file.png'
別的樹(shù):
1,http://code.google.com/p/jstree/
演示http://www.vakata.com/jsTree/examples/
2,http://be.twixt.us/jquery/treeView.php
3,http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
4,jQuery File Tree
? http://abeautifulsite.net/notebook_files/58/demo/
?
5,http://destroydrop.com/javascripts/tree/
6,自動(dòng)選擇子節(jié)點(diǎn)
? http://www.cnblogs.com/adandelion/archive/2006/05/20/405319.html
7,http://www.javaeye.com/topic/148372
8,jQuery SimpleTree Drag&Drop plugin
? http://news.kg/wp-content/uploads/tree
? http://www.javaeye.com/topic/249851
?? ????