right.jsp~47~
来自「JAVA诚信网络购物中心源码」· JSP~47~ 代码 · 共 108 行
JSP~47~
108 行
<%@ page contentType="text/html; charset=gb2312" %>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@page import="com.domain.GoodsForm" %>
<jsp:useBean id="newGood" scope="page" class="com.dao.GoodsDao"/>
<%List nowList =newGood.selectMark(Integer.valueOf("0"));%>
<%List freeList =newGood.selectMark(Integer.valueOf("1"));%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%if(session.getAttribute("form")!=null||session.getAttribute("id")!=null){%><br>
<table width="96%" height="189" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#819BBC">
<tr>
<td height="20" align="center" valign="middle" colspan="2">
<table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22">特价商品</td>
<td><div align="right"><a href="goodsAction.do?action=15&mark=1">更多</a></div></td>
</tr>
</table>
</td>
</tr>
<tr> <%
int free=2;
if(freeList.size()<2){
free=freeList.size();
}
for(int i=0;i<free;i++)
{
GoodsForm newGoods=(GoodsForm)freeList.get(i);
%>
<td height="80" valign="middle"> <table width="99%" height="136" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#819BBC">
<tr>
<td width="23%" rowspan="5" height="80"><input name="pricture<%=i%>" type="image" src="<%=newGoods.getPicture()%>" width="140" height="126"></td>
<td width="77%" height="20"><div align="center"><%=newGoods.getName()%></div></td>
</tr>
<tr>
<td height="20"><div align="center" style="text-decoration:line-through;color:#FF0000">原价:<%=newGoods.getNowPrice()%>元</div></td>
</tr>
<tr>
<td height="20"><div align="center">现价:<%=newGoods.getFreePrice()%>元</div></td>
</tr>
<tr>
<td height="20"><div align="center"><%=newGoods.getIntroduce()%></div></td>
</tr>
<tr>
<td height="13"><div align="center"><a href="#" onClick="window.open('goodsAction.do?action=16&id=<%=newGoods.getId()%>','','width=500,height=200');">查看详细内容</a></div></td>
</tr>
</table></td>
<%}%>
</tr>
</table>
<%}%>
<table width="96%" height="588" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#819BBC">
<tr>
<td height="20" align="center" valign="middle"><div align="left">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22">新品上架</td>
<td><div align="right"><a href="goodsAction.do?action=14&mark=0">更多</a></div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="529">
<div align="left">
<%
int now=5;
if(nowList.size()<5){
now=nowList.size();
}
for(int i=0;i<now;i++)
{
GoodsForm newGoods=(GoodsForm)nowList.get(i);
%>
</div>
<div align="left"></div>
<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#819BBC">
<tr>
<td width="36%" rowspan="4" height="120"><div align="center">
<input name="pricture<%=i%>" type="image" src="<%=newGoods.getPicture()%>" width="110" height="100">
</div></td>
<td width="64%" height="30"><div align="center"><%=newGoods.getName()%></div></td>
</tr>
<tr>
<td height="30"><div align="center">单价:<%=newGoods.getNowPrice()%>元</div></td>
</tr>
<tr>
<td height="30"><div align="center"><%=newGoods.getIntroduce()%></div></td>
</tr>
<tr>
<%if(session.getAttribute("form")!=null||session.getAttribute("id")!=null){%>
<td height="30"><div align="center"><a href="#" onClick="window.open('goodsAction.do?action=16&id=<%=newGoods.getId()%>','','width=500,height=200');">查看详细内容</a></div></td>
<%}else{%>
<td height="30"><div align="center">登录后才能购买</div></td>
<%}%>
</tr>
</table>
<%}%></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?