jQuery EasyUI Layout實(shí)現(xiàn)tabs標(biāo)簽的實(shí)例
jQuery EasyUI Layout實(shí)現(xiàn)tabs標(biāo)簽的實(shí)例
一、概述:
1、引入jquery.js與easyUi相關(guān)文件
2、效果如圖:

二、創(chuàng)建Layout主頁(yè):
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML >
<html>
<head>
<title>SSHE DEMO</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="jslib/jquery-easyui-1.3.1/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="jslib/jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="jslib/jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="jslib/jquery-easyui-1.3.1/themes/default/easyui.css" rel="external nofollow" type="text/css"></link>
<link rel="stylesheet" href="jslib/jquery-easyui-1.3.1/themes/icon.css" rel="external nofollow" type="text/css"></link>
<script type="text/javascript" src="jslib/syUtil.js"></script>
</head>
<body class="easyui-layout">
<div data-options="region:'north'" style="height: 60px;"></div>
<div data-options="region:'south'" style="height: 20px;"></div>
<div data-options="region:'west'" style="width: 200px;">
<jsp:include page="layout/west.jsp"></jsp:include>
</div>
<div data-options="region:'east',title:'east',split:true" style="width: 200px;"></div>
<div data-options="region:'center',title:'歡迎使用SSHE示例系統(tǒng)'" style="overflow: hidden;">
<jsp:include page="layout/center.jsp"></jsp:include>
</div>
<jsp:include page="user/login.jsp"></jsp:include>
<jsp:include page="user/reg.jsp"></jsp:include>
</body>
</html>
三、創(chuàng)建中間頁(yè)面:
<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript">
function addTab(opts) {
var t = $('#layout_center_tabs');
if (t.tabs('exists', opts.title)) {
t.tabs('select', opts.title);
} else {
t.tabs('add', opts);
}
}
</script>
<div id="layout_center_tabs" class="easyui-tabs" data-options="fit:true,border:false" style="overflow: hidden;">
<div title="首頁(yè)"></div>
</div>
四、菜單頁(yè):west.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<div class="easyui-panel" data-options="title:'功能導(dǎo)航',border:false,fit:true">
<div class="easyui-accordion" data-options="fit:true,border:false">
<div title="系統(tǒng)菜單" data-options="iconCls:'icon-save'">
<ul id="layout_west_tree" class="easyui-tree" data-options="
url : '${pageContext.request.contextPath}/menuAction!getAllTreeNode.action',
parentField : 'pid',
lines : true,
onClick : function(node) {
if (node.attributes.url) {
var url = '${pageContext.request.contextPath}' + node.attributes.url;
addTab({
title : node.text,
closable : true,
href : url
});
}
}
"></ul>
</div>
<div title="Title2" data-options="iconCls:'icon-reload'"></div>
</div>
</div>
如有疑問(wèn)請(qǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!
相關(guān)文章
基于jQuery實(shí)現(xiàn)左右圖片輪播(原理通用)
這篇文章主要介紹了基于jQuery實(shí)現(xiàn)左右圖片輪播,實(shí)現(xiàn)原理通用可通用,希望能和大家分享一下思路,感興趣的小伙伴們可以參考一下2015-12-12
jQuery-1.9.1源碼分析系列(十)事件系統(tǒng)之事件包裝
這篇文章主要介紹了jQuery-1.9.1源碼分析系列(十)事件系統(tǒng)之事件包裝的相關(guān)資料,需要的朋友可以參考下2015-11-11
jQuery AJAX實(shí)現(xiàn)調(diào)用頁(yè)面后臺(tái)方法和web服務(wù)定義的方法分享
jQuery AJAX實(shí)現(xiàn)調(diào)用頁(yè)面后臺(tái)方法和web服務(wù)定義的方法分享,需要的朋友可以參考下2012-03-03
jquery實(shí)現(xiàn)的動(dòng)態(tài)回到頂部特效代碼
這篇文章主要介紹了jquery實(shí)現(xiàn)的動(dòng)態(tài)回到頂部特效代碼,涉及jQuery基于時(shí)間函數(shù)的定時(shí)遞歸調(diào)用實(shí)現(xiàn)帶緩沖效果的移動(dòng)功能,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-10-10
jQuery實(shí)現(xiàn)高亮顯示網(wǎng)頁(yè)關(guān)鍵詞的方法
這篇文章主要介紹了jQuery實(shí)現(xiàn)高亮顯示網(wǎng)頁(yè)關(guān)鍵詞的方法,涉及jquery針對(duì)頁(yè)面字符串的遍歷與正則替換的相關(guān)技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-08-08
jQuery判斷當(dāng)前點(diǎn)擊的是第幾個(gè)li的代碼
jQuery中如何判斷當(dāng)前點(diǎn)擊的是第幾個(gè)li,使用$(this).index()取得li的下標(biāo),下面的示例,大家可以看看2014-09-09
jQuery獲取多種input值的簡(jiǎn)單實(shí)現(xiàn)方法
下面小編就為大家?guī)?lái)一篇jQuery獲取多種input值的簡(jiǎn)單實(shí)現(xiàn)方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-06-06

