`
cyantide
  • 浏览: 31728 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

dhtmlxtree 常用用法

 
阅读更多

 

<div id="treeboxbox_tree" style="width:200px; height:218px;background-color:#f5f5f5;border :1px solid Silver;"></div>
<script>
var tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
tree.setSkin('dhx_skyblue');
tree.setImagePath("<s:url value='/js/codebase/imgs/'/>");
//tree.enableDragAndDrop(0);
//tree.enableTreeLines(false);
//tree.setImageArrays("plus", "", "", "", "plus.gif");
//tree.setImageArrays("minus", "", "", "", "minus.gif");
//tree.setStdImages("book.gif", "books_open.gif", "books_close.gif");
//tree.setXMLAutoLoading("../common/tree4.xml");
tree.loadXML("tree4.xml");
tree.setOnClickHandler(doOnClick);
</script>
 

 

<script>
	function doOnClick(id){ 
		var url = tree.getUserData(id,"file");//获取这个ID节点下面的userdata属性 
		if(url!=null&&url!=''){
			parent.mainFrame.location=url;//上一级框架.RightFrame.请求 = url 
		}
	} 
</script>

 

 

<item text="数字词典管理" id="xtgl_szcdgl" >
	<userdata name="file">../../dictionary/dictionary.action</userdata>
</item>
 

 

分享到:
评论
Global site tag (gtag.js) - Google Analytics