先通过图片了解easyui
下载的官方网站:
EasyUI - helps you build your web pages easily
代码块:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!-- 引入公共页面 -->
<%@ include file="common/head.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',split:true" style="height:80px;text-align:center;">
<h1>后台书籍管理</h1>
</div>
<div data-options="region:'south',split:true" style="height:70px;text-align:center;">
©玉渊工作室所有,未经允许不可擅自使用
</div>
<div data-options="region:'west',title:'功能导航${ctx}',split:false" style="width:150px;"></div>
<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div>
</body>
</html>
公共页面的代码:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
//System.out.print(path); /easyui01
request.setAttribute("ctx",path);//${ctx}
//String a = (String) request.getAttribute("ctx");
//System.out.print(a); //System.out.print(path);
%>
<script type="text/javascript">
var ctx = '${ctx}';
</script>
<!--引入easyui的css -->
<link rel="stylesheet" type="text/css" href="${ctx}/js/jquery-easyui-1.5.5.2/themes/default/easyui.css"/>
<!--引入easyui的图标库 -->
<link rel="stylesheet" type="text/css" href="${ctx}/js/jquery-easyui-1.5.5.2/themes/icon.css"/>
<!--引入jQuery类库 -->
<script type="text/javascript" src="${ctx}/js/jquery-easyui-1.5.5.2/jquery.min.js"></script>
<!--引入easyui类库 -->
<script type="text/javascript" src="${ctx}/js/jquery-easyui-1.5.5.2/jquery.easyui.min.js"></script>
<!--引入easyui的语言包 支持中文 -->
<script type="text/javascript" src="${ctx}/js/jquery-easyui-1.5.5.2/locale/easyui-lang-zh_CN.js"></script>
效果图: