最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

SpringMVC+EasyUI實(shí)現(xiàn)頁(yè)面左側(cè)導(dǎo)航菜單功能

 更新時(shí)間:2019年09月09日 08:36:47   作者:hejjon  
這篇文章主要介紹了SpringMVC+EasyUI實(shí)現(xiàn)頁(yè)面左側(cè)導(dǎo)航菜單功能,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

1. 效果圖展示

2. 工程目錄結(jié)構(gòu)

注意: webapp下的resources目錄放置easyui和js(jQuery文件是另外的)

                  

3. 代碼

index.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>學(xué)生成績(jī)管理系統(tǒng) 管理員后臺(tái)</title>
  <link rel="stylesheet" type="text/css" href="/resources/easyui/css/default.css" rel="external nofollow" rel="external nofollow" />
  <link rel="stylesheet" type="text/css" href="/resources/easyui/themes/default/easyui.css" rel="external nofollow" rel="external nofollow" >
  <link rel="stylesheet" type="text/css" href="/resources/easyui/themes/icon.css" rel="external nofollow" rel="external nofollow" >
  <%--以下三個(gè)js文件導(dǎo)入順序不要調(diào)整!!--%>
  <script type="text/javascript" src="/resources/js/jquery-1.7.2.js"></script>
  <script type="text/javascript" src="/resources/easyui/jquery.easyui.min.js"></script>
  <script type="text/javascript" src="/resources/easyui/js/outlook2.js"></script>
  <script type="text/javascript">
    var _menus = {
      "menus": [
        {
          "menuid": "1", "icon": "", "menuname": "成績(jī)統(tǒng)計(jì)分析",
          "menus": [
            {
              "menuid": "11",
              "menuname": "考試列表",
              "icon": "icon-exam",
              "url": "ExamServlet?method=toExamListView"
            }
          ]
        },
        {
          "menuid": "2", "icon": "", "menuname": "學(xué)生信息管理",
          "menus": [
            {
              "menuid": "21",
              "menuname": "學(xué)生列表",
              "icon": "icon-user-student",
              "url": "StudentServlet?method=toStudentListView"
            },
          ]
        },
        {
          "menuid": "3", "icon": "", "menuname": "教師信息管理",
          "menus": [
            {
              "menuid": "31",
              "menuname": "教師列表",
              "icon": "icon-user-teacher",
              "url": "TeacherServlet?method=toTeacherListView"
            },
          ]
        },
        {
          "menuid": "4", "icon": "", "menuname": "基礎(chǔ)信息管理",
          "menus": [
            {
              "menuid": "41",
              "menuname": "年級(jí)列表",
              "icon": "icon-world",
              "url": "GradeServlet?method=toGradeListView"
            },
            {
              "menuid": "42",
              "menuname": "班級(jí)列表",
              "icon": "icon-house",
              "url": "ClazzServlet?method=toClazzListView"
            },
            {
              "menuid": "43",
              "menuname": "課程列表",
              "icon": "icon-book-open",
              "url": "CourseServlet?method=toCourseListView"
            }
          ]
        },
        {
          "menuid": "5", "icon": "", "menuname": "系統(tǒng)管理",
          "menus": [
            {
              "menuid": "51",
              "menuname": "系統(tǒng)設(shè)置",
              "icon": "icon-set",
              "url": "SystemServlet?method=toAdminPersonalView"
            },
          ]
        }
      ]
    };
  </script>

</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
<div region="north" split="true" border="false" style="overflow: hidden; height: 30px;
    line-height: 20px;color: #fff; font-family: Verdana, 微軟雅黑,黑體"></div>
<div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>
<div data-options="region:'west',title:'導(dǎo)航菜單',split:true" style="width:200px;">
  <div id="nav" class="easyui-accordion" fit="true" border="false">

  </div>
</div>
<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div>
</body>
</html>

springmvc.xml配置靜態(tài)資源

<!--靜態(tài)資源-->
<mvc:resources mapping="/resources/**" location="/resources/"/>

注意:

1. EasyUI和JQuery文件是放在webapp/resources目錄下的, 需要把 jquery-1.7.2.js也引進(jìn)去.

2. jsp文件中引入EasyUI的css和js文件的順序如下, 不要隨意調(diào)整!!!

   <link rel="stylesheet" type="text/css" href="/resources/easyui/css/default.css" rel="external nofollow" rel="external nofollow" />
  <link rel="stylesheet" type="text/css" href="/resources/easyui/themes/default/easyui.css" rel="external nofollow" rel="external nofollow" >
  <link rel="stylesheet" type="text/css" href="/resources/easyui/themes/icon.css" rel="external nofollow" rel="external nofollow" >
  <%--以下三個(gè)js文件導(dǎo)入順序不要調(diào)整!!--%>
  <script type="text/javascript" src="/resources/js/jquery-1.7.2.js"></script>
  <script type="text/javascript" src="/resources/easyui/jquery.easyui.min.js"></script>
  <script type="text/javascript" src="/resources/easyui/js/outlook2.js"></script>

3. springMVC的靜態(tài)資源配置是針對(duì)resources目錄下所有文件的, 所以之后的圖片等靜態(tài)資源文件也直接放在resources目錄下即可.

4. 導(dǎo)航菜單是在以下id為nav的div里顯示的

<div data-options="region:'west',title:'導(dǎo)航菜單',split:true" style="width:200px;">
  <div id="nav" class="easyui-accordion" fit="true" border="false">

  </div>
</div>

該div的id屬性一定要是 nav, 試過(guò)其它的都沒(méi)有效果.

總結(jié)

以上所述是小編給大家介紹的SpringMVC+EasyUI實(shí)現(xiàn)頁(yè)面左側(cè)導(dǎo)航菜單功能,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
如果你覺(jué)得本文對(duì)你有幫助,歡迎轉(zhuǎn)載,煩請(qǐng)注明出處,謝謝!

相關(guān)文章

最新評(píng)論

朔州市| 丰原市| 五寨县| 吉安县| 上饶县| 乌拉特中旗| 沙雅县| 合阳县| 岫岩| 嘉义县| 通海县| 沂水县| 广昌县| 大厂| 策勒县| 即墨市| 绍兴市| 勐海县| 广昌县| 修文县| 怀来县| 忻城县| 黄大仙区| 久治县| 峡江县| 凯里市| 涪陵区| 永和县| 化州市| 吴旗县| 鸡东县| 新干县| 云阳县| 额济纳旗| 古田县| 宜良县| 玉溪市| 石嘴山市| 霸州市| 西乌珠穆沁旗| 陕西省|