三行代碼實現樹形菜單(多種風格的菜單展示),三行樹形
代碼
<html><head><title>XML樹</title><chinahtml file="help/tree/act.htm"/><!-- 引入樹操作檔案 --><style>div{padding-left:0px;padding-top:0px;cursor:normal;font-size:12px}</style></head><body onload="onStart();"><table border=0 style="overflow:scroll" cellspacing=0 cellpadding=0><tr><td height=8></td></tr><tr><td><chtml><bag id=pPage><we name=imgPath>help/tree</we><we name=id>e</we></bag><xmlTree id="e" url="javascript:alert" imgPath="@{pPage:imgPath}" p="HtokID">_samples/test.xml</xmlTree></chtml></td></tr></table></body></html>
風格1:圖片路徑為help/tree
<bag id=pPage><we name=imgPath>help/tree</we><we name=id>e</we></bag>
效果
風格2:圖片路徑為base/tree(輕開B2C電子商務網站組織機構執行個體,檔案為base/xml/tree.html)
<bag id=pPage><we name=imgPath>base/tree</we><we name=id>e</we></bag>
效果
風格3:圖片路徑為help/tree/1
<bag id=pPage><we name=imgPath>help/tree/1</we><we name=id>e</we></bag>
效果
風格4:圖片路徑為help/tree/2
<bag id=pPage><we name=imgPath>help/tree/2</we><we name=id>e</we></bag>
效果
風格5:圖片路徑為help/tree/3
<bag id=pPage><we name=imgPath>help/tree/3</we><we name=id>e</we></bag>
效果
相當炫麗吧
輕鬆互連網開發平台(Easy Do IT)資源下載
平台及最新開發手冊免費下載:http://download.csdn.net/detail/tx18/8464425
開發執行個體:輕開B2C電子商務網站,免費下載:http://download.csdn.net/detail/tx18/8318585
輕開平台會不定期升級為大家提供更多強大而Easy的功能,請留意下載最新的版本