目录
后台主界面采用的是EasyUI框架,首先要去官网下载对应的jar包;
下载完之后直接复制粘贴在项目里面去;
1. 引入EasyUI核心文件;
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/themes/icon.css">
<script type="text/javascript" src="jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
2. main.jsp完整代码;
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>学生信息管理系统</title>
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.3/themes/icon.css">
<script type="text/javascript" src="jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
$(function(){
//数据
var treeData=[{
text:"根",
children:[{
text:"班级信息管理",
attributes:{
url:""
}
},{
text:"学生信息管理",
attributes:{
url:""
}
}]
}];
//实例化菜单
$("#tree").tree({
data:treeData,
lines:true
});
});
</script>
</head>
<body class="easyui-layout">
<div region="north" style="height: 80px; background-color:#E0EDFF ">
<img src="images/main.jpg">
</div>
<div region="center">
<div class="easyui-tabs" fit="true" border="false" id="tabs">
<div title="首页">
<div align="center" style="padding-top: 100px;"><font color="red"; size="10">欢迎使用!</font></div>
</div>
</div>
</div>
<div region="west" style="width: 150px" title="导航菜单" split="true">
<ul id="tree"></ul>
</div>
<div region="south" style="height: 50px;" align="center">版权所有 2019 Colin</div>
</body>
</html>
效果: