📄 view.jsp
字号:
<?xml version="1.0" encoding="gbk"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%@ page contentType="text/html;charset=gb2312"%>
<%----此句必不可少,否则将会出现乱码----%>
</head>
<style type="text/css">
<!--
.STYLE1 {
font-family: "宋体";
font-size: 9pt;
}
-->
</style>
<table width="550" border="0" height="650">
<tr>
<td align="left" valign="top"><table width="100%" border="0" >
<%@ page import="java.util.*" %>
<tr>
<%-- 生成标题 --%>
<td height="30" width="550" align="left" valign="top" background="images/main_catalog_03.gif" colspan="4">
</td>
</tr>
<tr>
<%
ArrayList goodsList=new ArrayList();
Hashtable goodHash=null;
goodsList=(ArrayList)application.getAttribute("goodsList");
if(goodsList == null){
out.println("<script language=javascript> alert(\"goodsList hasn't been initilized :: logical error!\"); </script>");
return ;
}
int i=0;
for(i=0;i<goodsList.size();i++){
goodHash=new Hashtable();
goodHash=(Hashtable)goodsList.get(i);
if(goodHash==null){
out.println("<script language=javascript> alert(\"data name can't be null\");</script>");
return ;
}
String price=goodHash.get("goodPrice").toString();
price=price.substring(0,price.length()-2);
%>
<TD width="24%" height=110>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
<TBODY>
<TR align=center>
<TD colSpan=2>
<TABLE cellSpacing=0 cellPadding=0 width=129 border=0>
<TBODY>
<TR>
<TD width=9> </TD>
<TD width=110> </TD>
<TD width=10> </TD>
</TR>
<TR>
<TD background=<%=request.getContextPath()%>/images/product_center_left.gif>
</TD>
<TD align=middle>
<A href="<%=request.getContextPath()%>/ShowDetialAction?goodId=<%=goodHash.get("goodId")%>" target=_blank>
<IMG style="BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc"
height=110 src="<%=request.getContextPath()%>/images/<%=goodHash.get("goodPath")%>" width=110 border="0"></A>
</TD>
<TD background=<%=request.getContextPath()%>/images/product_center_right.gif>
</TD>
</TR>
<TR>
<TD> </TD>
<TD> </TD>
<TD> </TD>
</TR>
</TBODY></TABLE>
</TD>
</TR>
<TR>
<TD align=middle width=7> </TD>
<TD align=middle width=573>
<A href="<%=request.getContextPath()%>/ShowDetialAction?goodId=<%=goodHash.get("goodId")%>" target=_blank>
<FONT color=#006600><%=new String(((String)goodHash.get("goodName")).getBytes("gbk"))%></FONT></A>
<BR>购买价:¥<FONT color=#ff0000><%=price%></FONT>
<BR><a href="<%=request.getContextPath()%>/BuyAction?goodId=<%=goodHash.get("goodId")%>"><IMG style="BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc"
height=19 src="<%=request.getContextPath()%>/images/buyone.gif" width=52 border="0"></a>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<% if((i+1)%4==0){ //换行
out.print("</tr> <tr>");
}
}
%>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -