?? storage.jsp
字號:
<%@ page language="java" pageEncoding="utf-8"%>
<%!int p=1;%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Integer sum=(Integer)session.getAttribute("sum");
String p1= request.getParameter("p");
String p2= request.getParameter("p2");
if((p1==null || "".equals(p1))&&(p2==null || "".equals(p2)))
{
p1="1";
}
else if(p2!=null)
{
p1=p2;
}
int p = Integer.parseInt(p1);
//總頁數
int s =(sum+5-1)/5;
%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html>
<html:base/>
<head>
<title>jb-aptech畢業設計項目</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script src="../script/common.js"></script>
</head>
<body>
<form action="<%=path %>/storage.do" method="post">
<input type="hidden" name="flag" value="select"/>
<div class="page_title">產品查詢</div>
<div class="button_bar">
<button class="common_button" onclick="help('');">幫助</button>
<button class="common_button" type="submit">查詢</button>
</div>
<table class="query_form_table">
<tr>
<th>產品</th>
<td><input name="productname"/></td>
<th>倉庫</th>
<td><input name="stkWarehouse"/></td>
<th> </th>
<td> </td>
</tr>
</table>
</form>
<br />
<table class="data_list_table">
<tr>
<th>序號</th>
<th>產品</th>
<th>倉庫</th>
<th>貨位</th>
<th>件數</th>
<th>備注</th>
</tr>
<logic:iterate id="st" name="list" scope="request">
<tr>
<td class="list_data_number"><bean:write name="st" property="stkId"/></td>
<td class="list_data_ltext"><bean:write name="st" property="product.prodName"/></td>
<td class="list_data_ltext"><bean:write name="st" property="stkWarehouse"/></td>
<td class="list_data_text"><bean:write name="st" property="stkWare"/></td>
<td class="list_data_number"><bean:write name="st" property="stkCount"/></td>
<td class="list_data_ltext"><bean:write name="st" property="stkMemo"/></td>
</tr>
</logic:iterate>
<tr>
<th colspan="100" class="pager">
<div class="pager">
總頁數:<%=s%> 當前頁:<%=p%> 每頁顯示5條;
<%if(p!=1){ %>
<a href="<%=path %>/storage.do?flag=list&p=<%=1%>">首頁</a>
<a href="<%=path %>/storage.do?flag=list&p=<%=p-1%>">上一頁</a>
<% } %>
<%if(p!=s&&p<s){ %>
<a href="<%=path %>/storage.do?flag=list&p=<%=p+1%>">下一頁</a>
<a href="<%=path %>/storage.do?flag=list&p=<%=s%>">尾頁</a>
<% } %>
</div>
</th>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -