?? bookgood.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>無標題文檔</title>
<style type="text/css">
<!--
.STYLE1 {font-family: "新宋體"}
.STYLE2 {font-size: medium}
-->
</style>
</head>
<body bgcolor="#0099FF">
<%
session.getAttribute("dept_id");
%>
<h1 align="center">請訂購商品</h1><h3><a href="operator.jsp">返回</a></h3><hr>
<form name="form1" method="post" action="">
<table width="949" border="1">
<tr>
<td height="33"><h3 align="center"bgcolor="#FFCC99">商品編號</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品名稱</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">供貨商編號</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品單價</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品單位</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品信息</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">部門編號</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">訂購</h3></td>
</tr>
<%
try{
ResultSet rs =(ResultSet)request.getAttribute("applet");
int dept_id = 0;
while(rs.next()){
//dept_id = rs.getInt("dept_id");
%>
<tr>
<td height="34" align="center"><%=rs.getInt("good_id")%></td>
<td align="center">*<%=rs.getString("good_name")%>*</td>
<td align="center"><%=rs.getInt("vender_id")%></td>
<td align="center">¥:<%=rs.getDouble("good_price")%>元</td>
<td align="center"><%=rs.getString("good_unit")%></td>
<td align="center"><%=rs.getString("good_message")%></td>
<td align="center"><%=rs.getInt("dept_id")%></td>
<td align="center"><a href=/SMarket/c?id=<%=rs.getInt("good_id")%> class="STYLE2">訂購</a></td>
</tr>
<%
}
session.setAttribute("dept_id",session.getAttribute("dept_id"));
%>
</table>
<p> </p>
<hr>
<p><h3 align="center"><a href="booknewgood.jsp?id=<%=dept_id%>" class="STYLE1">訂購新商品</a></h3>
</p>
<%
}catch(Exception e){
e.printStackTrace();
}
%>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -