easyui我是参照菜鸟教程中《jQuery EasyUI 布局 - 动态添加标签页(Tabs》
网址:https://www.runoob.com/jeasyui/jeasyui-layout-tabs2.html
源代码:
main_view.jsp
<%--
Created by IntelliJ IDEA.
User: Atlantide
Date: 2020/1/27
Time: 15:51
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
jQuery EasyUI Demo
<!-- 动态菜单JS -->
<br> function addTab(title, url){<br> if ($('#tt').tabs('exists', title)){<br> $('#tt').tabs('select', title);<br> } else {<br> var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>';<br> $('#tt').tabs('add',{<br> title:title,<br> content:content,<br> closable:true<br> });<br> }<br> }</p> <pre><code></script> </code></pre> <p></head><br> <body><br> <div class="cont-top"><br> <img src="../images/main/华依logo.jpg" width="100px" height="80px"><br>                <br>                <br>                <br>                <br>                <br>                <br> <img src="../images/main/用户头像.jpg" width="60px" height="50px"><br> </div></p> <div style="margin-bottom:10px"> <div class="left-menu" style="height:949px;"> <div class="menu-list"> <ul> <li class="menu-list-01" > <p class="fumenu">库房管理</p> <img class="xiala" src="../images/main/xiala.png" /> <div class="list-p"> <p class="zcd"><a href="#" class="a" onclick="addTab('库房分配','/erp/warehouse_distribution')"> <font color="white">库房分配</font></a></p> <p class="zcd"><a href="#" class="a" onclick="addTab('入库单','/erp/material_warehouse')"> <font color="white">入库单</font></a></p> <p class="zcd"><a href="#" class="a" onclick="addTab('出库单','/erp/product_warehouse')"> <font color="white">出库单</font></a></p> <p class="zcd"><a href="#" class="a" onclick="addTab('库存余额','/erp/product_warehouse')"> <font color="white">库存余额</font></a></p> </div> <pre><code> </li> <li class="menu-list-02" > <p class="fumenu">销售管理</p> <img class="xiala" src="../images/main/xiala.png" /> <div class="list-p"> <p class="zcd"><a href="#" class="a" onclick="addTab('库房分配','/erp/warehouse_distribution')"> <font color="white">库房分配</font></a></p> <p class="zcd"><a href="#" class="a" onclick="addTab('入库单','/erp/material_warehouse')"> <font color="white">入库单</font></a></p> <p class="zcd"><a href="#" class="a" onclick="addTab('出库单','/erp/product_warehouse')"> <font color="white">出库单</font></a></p> <p class="zcd"><a href="#" class="a" onclick="addTab('库存余额','/erp/product_warehouse')"> <font color="white">库存余额</font></a></p> </div> </li> </ul> </div> </div></div> <div class="right-menu"> </code></pre> <p><div id="tt" class="easyui-tabs" style="width:1200px;height:1000px"><br> <div title="首页"><br> </div><br> </div><br> </div><br> </body><br> </html></p> <p>warehouse_distribution.jsp</p> <p><%@ page import="java.util.List" %><br> <%@ page import="com.springboot.erp.entity.Warehouse" %><br> <%@ page import="java.util.ArrayList" %><%--<br> Created by IntelliJ IDEA.<br> User: Atlantide<br> Date: 2020/1/27<br> Time: 20:47<br> To change this template use File | Settings | File Templates.<br> --%><br> <%@ page contentType="text/html;charset=UTF-8" language="java" %><br> <html><br> <head><br> <title>库房分配</title><br> <link type="text/css" rel="stylesheet" href="../css/main/main_view.css"/><br> </head><br> <body><br> <%<br> List<Warehouse> warehouseList=new ArrayList<Warehouse>();<br> if(session.getAttribute("all_warehouses_session")!=null){<br> warehouseList=(List)session.getAttribute("all_warehouses_session");<br> session.removeAttribute("all_warehouses_session");<br> }<br> %><br>            </p> <form action="" method="post"> 请输入仓库号:     <input type="text" name="warehouse_no">     <input type="submit" value="查询"> </form> <table border="1" class="t1" width="70%"> <tr> <th>仓库编号</th> <th>仓库名称</th> <th>仓库地址</th> <th>仓库容量</th> <th>仓库租金</th> <th>操作</th> </tr> <% for(Warehouse wh:warehouseList){ %> <tr> <td align="center"><%=wh.getWarehouse_no()%></td> <td align="center"><%=wh.getName()%></td> <td align="center"><%=wh.getLocation()%></td> <td align="center"><%=wh.getVolume()%></td> <td align="center"><%=wh.getRent()%></td> </tr> <% } %> </table> <p></body><br> </html></p> <p><img src="https://img-ask.csdn.net/upload/202001/29/1580227234_221935.png" alt="图片说明"></p>