?? view_product.jsp
字號:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="shopbean.ConnDB" %>
<%@ page import="java.sql.*" %>
<html>
<head><title>Easy Buy Online</title>
<%
String p_id=(String) request.getParameter("p_id");
String p_type="",p_name="",p_quantity="",p_image="",p_description="";
float p_price=0;
ConnDB conn=new ConnDB();
String sql="select * from product where p_id='"+p_id+"'";
ResultSet rs = conn.doQuery(sql);
while(rs.next())
{
p_type=rs.getString(1);
p_name=rs.getString(3);
p_price=rs.getFloat(4);
p_quantity=rs.getString(5);
p_image=rs.getString(6);
p_description=rs.getString(7);
}
%>
<style type="text/css">
<!--
.STYLE1 {
font-size: 12px;
}
.STYLE2 {
font-size: 14px;}
.STYLE3 {color: #FF0000}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<center>
<table width="520" border="1" bordercolor="#99CCFF" cellpadding="0" cellspacing="0" style="border-collapse:collapse">
<!--DWLayoutTable-->
<tr>
<td height="40" colspan="3" align="center" bgcolor="#99CCFF"><span class="STYLE2">查看/修改商品</span></td>
</tr>
<tr>
<td width="127" align="center"><span class="STYLE1">商品類型</span>:</td>
<td height="44" colspan="2" class="STYLE2"> <%= p_type %></td>
</tr>
<tr>
<td width="127" align="center"><span class="STYLE1">商品ID</span>:</td>
<td width="238" height="35" class="STYLE2"> <%= p_id %></td>
<td width="127" rowspan="4" align="center"><img src="../<%= p_image %>" width="110"/></td>
</tr>
<tr>
<td width="127" align="center"><span class="STYLE1">商品名稱</span>:</td>
<td height="35" class="STYLE2"> <%= p_name %></td>
</tr>
<tr>
<td width="127" height="34" align="center"><span class="STYLE1">商品原價</span>:</td>
<td align="left" style="text-decoration:line-through;color:#FF0000">
<font size="2"> ¥ <%=p_price+p_price*0.3 %> </font> </td>
</tr>
<tr>
<td width="127" align="center"><span class="STYLE1">商品現價</span>:</td>
<td height="35" class="STYLE2"> <font size="2" color="red">¥ <%= p_price %></font></td>
</tr>
<tr>
<td height="30" colspan="2"></td>
<td height="30" align="center" class="STYLE2 STYLE3"><a href="#" onClick="window.open('view_picture.jsp?p_id=<%= p_id %>','help','scrollbars=yes,resizable=yes,width=600,height=400')">游覽大圖</a></td>
</tr>
<tr>
<td width="127" align="center"><span class="STYLE1">商品描述</span>:</td>
<td height="30" colspan="2"><textarea name="p_description" cols="45" rows="12"><%= p_description %></textarea></td>
</tr>
<tr class="STYLE2">
<td height="40" colspan="3" align="center"><a href="javascript:window.close()" class="styleac">[關閉窗口]</a></td>
</tr>
</table>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -