1.首先是下载js包,为了样式展示好看,在js包里有个bootstrap.min.css
下载地址https://download.csdn.net/download/weixin_38644118/11245369
2.前端index.html
<html>
<head>
<meta charset="UTF-8">
<title>jOrgChart异步加载</title>
<link href="jOrgChart-master/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href='jOrgChart-master/jquery.jOrgChart.css'/>
<style>
a {
text-decoration: none;
color: #fff;
font-size: 12px;
}
.jOrgChart .node {
width: 120px;
height: 50px;
line-height: 50px;
border-radius: 4px;
margin: 0 8px;
}
</style>
</head>
<body>
<!--显示组织架构图-->
<div id='jOrgChart'></div>
<!-- 全局js -->
<script src="jOrgChart-master/jquery.min.js"></script>
<!--插件js-->
<!--jOrgChart-->
<script type="text/javascript" src="jOrgChart-master/jquery.jOrgChart.js"></script>
<script type='text/