当前位置: 代码迷 >> JavaScript >> js1-ztree
  详细解决方案

js1-ztree

热度:766   发布时间:2012-09-03 09:48:39.0
js1-----ztree
var setting = {	
			view: {
				showLine: false,
				showIcon: false,
				nameIsHTML:true
			}
		};

		var zNodes =[
			{ name:"父节点1 - 展开", open:true,
				children: [
					{ name:"父节点11 - 折叠",open:true,
						children: [
							{ name:"叶子节点111"},
							{ name:"<table class='tab' id='11'><tr><td>111111</td><td>111111</td></tr></table>"},
							{ name:"叶子节点111",open:true,
								children: [
									{ name:"叶子节点111"}
							]}
					]},
					{ name:"父节点12 - 折叠",open:true,
						children: [
							{ name:"叶子节点121叶子节点121叶子节点点121叶子节点121叶子节点"},
							{ name:"<table class='tab' id='22'><tr><td>此处为table列,样式没有显示出来</td><td>此处为table列,样式没有显示出来</td></tr></table>"},
							{ name:"叶子节点111"}
					]},
					
					{ name:"父节点12 - 折叠",open:true,
						children: [
							{ name:"叶子节点121叶子节点121叶子节点点121叶子节点121叶子节点"},
							{ name:"<table class='tab' id='44'><tr><td>此处为table列,sssssssssss</td><td>此处为table列</td></table>"},
							{ name:"叶子节点111"}
					]},
					{ name:"父节点12 - 折叠",open:true,
						children: [
							{ name:"叶子节点121叶子节点121叶子节点点121叶子节点121叶子节点"},
							{ name:"<table class='tab' id='44'><tr><td style='padding:4px;border: solid 1px #316Aaa;'>此处为table列</td><td style='padding:4px;border: solid 1px #316Aaa;'>sssssssss</td></tr></table>"}
					]}
				]}
		];
?