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

這篇文章主要介紹SpringMVC+EasyUI如何實(shí)現(xiàn)頁(yè)面左側(cè)導(dǎo)航菜單功能,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

創(chuàng)新互聯(lián)建站主要從事成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)平樂(lè),十多年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來(lái)電咨詢建站服務(wù):028-86922220

代碼

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"  scroll="no"><p region="north" split="true" border="false" ></p><p data-options="region:'south',title:'South Title',split:true" ></p><p data-options="region:'west',title:'導(dǎo)航菜單',split:true" >  <p id="nav" class="easyui-accordion" fit="true" border="false">  </p></p><p data-options="region:'center',title:'center title'" ></p></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的p里顯示的

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

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

以上是“SpringMVC+EasyUI如何實(shí)現(xiàn)頁(yè)面左側(cè)導(dǎo)航菜單功能”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

網(wǎng)頁(yè)名稱:SpringMVC+EasyUI如何實(shí)現(xiàn)頁(yè)面左側(cè)導(dǎo)航菜單功能
鏈接分享:http://bm7419.com/article10/isghdo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、網(wǎng)站設(shè)計(jì)、網(wǎng)頁(yè)設(shè)計(jì)公司、軟件開(kāi)發(fā)、商城網(wǎng)站、用戶體驗(yàn)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)