一、创建图书表
并插入测试数据以下为例:
三,使用iframe更改导航栏的请求路径
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <%@ include file="common/head.jsp" %> <title>Insert title here</title> <script type="text/javascript"> $(function(){ $("#funcTree").tree({ url:ctx+'/ModuleServlet', //用户双击一个节点触发 onDblClick: function(node){ if(!$("#tt").tabs('exists',node.text)){ $('#tt').tabs('add',{ title:node.text, content:'<iframe frameborder=0 src="' + node.url + '" scrolling="no" style="width:100%;height:100%;"></iframe>', closable:true, tools:[{ iconCls:'icon-mini-refresh', handler:function(){ alert('refresh'); } }] }); } } }); }); </script> </head> <body class="easyui-layout"> <div data-options="region:'west',title:'功能导航',split:true" style="width:150px;"> <ul id="funcTree" class="easyui-tree"></ul> </div> <div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"> <div id="tt" class="easyui-tabs" style="width:100%;height:100%;"> <div title="首页" style="padding:20px;display:none;"> 首页