【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./css/demo.css" type="text/css">
<link rel="stylesheet" href="./css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="./js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="./js/jquery.ztree.core.js"></script>
<title>test ztree 3 learning</title>
</head>
<body>
<h1>ztree test 3</h1>
<div class="content_wrap">
<div class="zTreeDemoBackground left">
<div id="tree1" class="ztree"></div>
</div>
<div class="right">
<ul class="info">1.xxxxxx
<li class="title">1.xxxxxx</li>
<li class="list">cccc
<li>aaaa</li>
<li>bbbb</li>
</li>
</ul>
<ul class="info">2.xxxxxx
<li class="title">2.xxxxxx</li>
<li class="list">dddd
<li >cccc</li>
<li>dddd</li>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
var setting = {
data: {
simpleData: {
enable: true
}
}
};
var zNodes = [{
id: 1,
pId: 0,
name: "baidu",
url: "http://www.baidu.com",
target: "_blank"
}, {
id: 2,
pId: 0,
name: "sina",
url: "http://www.sina.com",
target: "_blank"
}, {
id: 3,
pId: 0,
name: "qq",
url: "http://www.qq.com",
target: "_blank"
}];
$(function() {
$.fn.zTree.init($("#tree1"), setting, zNodes);
});
</script>
</body>
</html>
来源:oschina
链接:https://my.oschina.net/u/1866807/blog/730511