欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

 更新時(shí)間:2019年09月09日 08:36:47   作者:hejjon  
這篇文章主要介紹了SpringMVC+EasyUI實(shí)現(xiàn)頁面左側(cè)導(dǎo)航菜單功能,本文通過實(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é)生成績管理系統(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": "成績統(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": "年級列表",
              "icon": "icon-world",
              "url": "GradeServlet?method=toGradeListView"
            },
            {
              "menuid": "42",
              "menuname": "班級列表",
              "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)資源配置是針對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, 試過其它的都沒有效果.

總結(jié)

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

相關(guān)文章

  • Spring Native項(xiàng)目實(shí)戰(zhàn)(體驗(yàn)79毫秒啟動(dòng)springboot應(yīng)用)

    Spring Native項(xiàng)目實(shí)戰(zhàn)(體驗(yàn)79毫秒啟動(dòng)springboot應(yīng)用)

    Spring Native是Spring提供的、制作native image的技術(shù)方案,本篇主要內(nèi)容是開發(fā)springboot應(yīng)用再構(gòu)建為native image的方法,通過Spring Native項(xiàng)目實(shí)戰(zhàn)讓大家體驗(yàn)79毫秒啟動(dòng)springboot應(yīng)用,感興趣的朋友跟隨小編一起看看吧
    2021-05-05
  • Spring Boot實(shí)現(xiàn)功能的統(tǒng)一詳解

    Spring Boot實(shí)現(xiàn)功能的統(tǒng)一詳解

    這篇文章主要介紹了Spring Boot統(tǒng)一功能的處理,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2022-06-06
  • 詳解Java爬蟲利器Jsoup

    詳解Java爬蟲利器Jsoup

    Jsoup是一款Java語言開發(fā)的HTML解析器,用于解析HTML文檔以及對HTML文檔進(jìn)行操作,處理等,本文就將詳細(xì)給大家介紹一下Java中的爬蟲利器Jsoup,感興趣的同學(xué)可以參考一下
    2023-06-06
  • JS+Struts2多文件上傳實(shí)例詳解

    JS+Struts2多文件上傳實(shí)例詳解

    這篇文章主要為大家詳細(xì)介紹了JS+Struts2多文件上傳實(shí)例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2018-08-08
  • jar包運(yùn)行后顯示沒有主清單屬性的問題及解決

    jar包運(yùn)行后顯示沒有主清單屬性的問題及解決

    這篇文章主要介紹了jar包運(yùn)行后顯示沒有主清單屬性的問題及解決方案,具有很好的參考價(jià)值,希望對大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-12-12
  • java并發(fā)編程專題(十)----(JUC原子類)基本類型詳解

    java并發(fā)編程專題(十)----(JUC原子類)基本類型詳解

    這篇文章主要介紹了java JUC原子類基本類型詳解的相關(guān)資料,文中示例代碼非常詳細(xì),幫助大家更好的理解和學(xué)習(xí),感興趣的朋友可以了解下
    2020-07-07
  • Springboot中Dependency not found解決方案

    Springboot中Dependency not found解決方案

    本文主要介紹了Springboot中Dependency not found解決方案,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-11-11
  • Mybatis關(guān)于動(dòng)態(tài)排序 #{} ${}問題

    Mybatis關(guān)于動(dòng)態(tài)排序 #{} ${}問題

    這篇文章主要介紹了Mybatis關(guān)于動(dòng)態(tài)排序 #{} ${}問題,具有很好的參考價(jià)值,希望對大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-10-10
  • IntelliJ IDEA2020.1版本更新pom文件自動(dòng)導(dǎo)包的方法

    IntelliJ IDEA2020.1版本更新pom文件自動(dòng)導(dǎo)包的方法

    這篇文章主要介紹了IntelliJ IDEA2020.1版本更新pom文件自動(dòng)導(dǎo)包的方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-06-06
  • Java ArrayList使用總結(jié)

    Java ArrayList使用總結(jié)

    這篇文章主要介紹了Java ArrayList使用總結(jié),幫助大家更好的理解和學(xué)習(xí)使用Java,感興趣的朋友可以了解下
    2021-03-03

最新評論