日期:2014-05-17 浏览次数:20481 次
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<link href="../../zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery.ztree.core-3.5.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.ztree.all-3.5.min.js" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
<script type="text/javascript">
var setting = {
data: { simpleData: { enable: true, idkey: "id", pidkey: "pId", rootpid: null} },
view: {
selectedMulti: false,
showLine: true,
showIcon: false
}
};
var zNodes = [
{ "id": 1, "pId": 0, "name": "test1" },
{ "id": 11, "pId": 1, "name": "test11" },
{ "id": 12, "pId": 1, "name": "test12" },
{ "id": 111, "pId": 11, "name": "test111" }
];
$(document).ready(function () {
$.fn.zTree.init($("#treeDemo"), setting, zNodes);
});
</script>
</head>
<body>
<div class="zTreeDemoBackground left">
<ul id="treeDemo" class="ztree" style="width: 230px; overflow: auto;">
</ul>
</div>
@RenderBody()
</body>
<script>
</script>
</html>