📄 shopcar.jsp~46~
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<%@page import="taobaoproject.*" %>
<%@ include file="check.jsp" %>
<html>
<head>
<title>
飞梦通信:我的购物车
</title>
<LINK href="css/new_cart.css" rel=stylesheet>
<SCRIPT language="JavaScript" type="">
function isnumber()
{
var product_shuliang0
product_shuliang0= new String(document.form1.product_shuliang0.value)
if (product_shuliang0.length==0)
{
document.getElementById("alertMsg").innerHTML = "<br>您输入的数量值不能为空,请填写!<br>"
document.getElementById('Layer2').style.display='block'
location= "#top";
return false;
}
if(isNaN(product_shuliang0))
{
document.getElementById("alertMsg").innerHTML = "<br>您输入的数量值必须为数字,请确定重新输入!<br>"
document.getElementById('Layer2').style.display='block'
location= "#top";
return false;
}
if(document.form1.product_shuliang0.value < 0)
{
document.getElementById("alertMsg").innerHTML = "<br>您输入的数量值必须为大于0的整数,请确定重新输入!<br>"
document.getElementById('Layer2').style.display='block'
location= "#top";
return false;
}
return true;
}
</SCRIPT>
</head>
<body bgcolor="#ffffff">
<jsp:include flush="true" page="head.jsp"/>
<table cellSpacing=0 cellPadding=5 width="100%" border=0>
<tr>
<td>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tr>
<td width="22%"><img height=31 src="images/shop-cart-header-blue.gif" width=218 border=0 alt=""></td>
<td width="78%"></td>
<td align=right colSpan=2><a href="delete_all.jsp"><img alt=清空购物车 src="images/az-empty-shoppingcard.gif" border=0></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<form action="shopcar.jsp" onsubmit="return isnumber()">
<table cellSpacing=0 cellPadding=10 width="100%" border=1>
<tr bgColor=#d7ebff>
<td width=500 colSpan=2><STRONG>我的购物车里的商品</STRONG></td>
<td width=100>
<div align=center><STRONG>市场价</STRONG></div></td>
<td width=100>
<div align=center><STRONG>会员价</STRONG></div></td>
<td width=70>
<div align=center><STRONG>数量</STRONG></div></td>
</tr>
<!-- 购物车列表开始-->
<%
Vector buylist = (Vector)session.getValue("shopcar");
if(buylist != null && buylist.size() > 0) {
float pricenum = 0;
float marketPrice = 0;
for(int i = 0;i< buylist.size();i++) {
ShouJI_Bean shouJi = (ShouJI_Bean)buylist.elementAt(i);
marketPrice += shouJi.getBuynum() * shouJi.getMarketPrice();
pricenum += shouJi.getBuynum() * shouJi.getMemberPrice();
%>
<tr vAlign=top>
<td>
<div align=right><SPAN class=font14><STRONG>
<a href="delete.jsp?ati=<%=i %>"><IMG height=17 src="images/delete.gif" width=45 border=0 alt=""></A></STRONG></SPAN>
</DIV>
</TD>
<TD><a href="xiangxi.jsp?goodsID=<%=shouJi.getGoodsID() %>"><STRONG><%=shouJi.getGoodsName() %></STRONG></A>
</TD>
<TD width=100>
<P align=center><SPAN class=price><STRONG>
<FONT color=black><S>¥<%=shouJi.getMarketPrice() %></FONT></S></STRONG></SPAN><BR></P>
</TD>
<TD width=100>
<DIV align=center><SPAN class=price><STRONG>¥<%=shouJi.getMemberPrice() %><B class=price>元</B></STRONG></SPAN>
</DIV>
</TD>
<TD align="center" width=70>
<input type="text" value="<%=shouJi.getBuynum() %>" size="2" />
</TD>
</TR><%} %>
<!-- 购物车列表结束-->
<TR vAlign=top>
<TD colSpan=5><IMG height=1 src="images/green-pixel.gif" width="100%" border=0 alt="">
</TD>
</TR>
<TR vAlign=top>
<TD width=500 colSpan=2>
<DIV align=right><SPAN class=price><STRONG><B><FONT
color=black>共计:</FONT></B></STRONG></SPAN>
</DIV>
</TD>
<TD width=100>
<DIV align=center><SPAN class=price><STRONG><B class=price>
<FONT color=black><S>¥<%=marketPrice %></FONT></S></B></STRONG></SPAN>
</DIV>
</TD>
<TD width=100>
<DIV align=center><SPAN class=price>
<STRONG><B class=price>¥<%=pricenum %>元</B></STRONG></SPAN>
</DIV>
</TD>
<TD vAlign=top align=left width=70>
<INPUT type=image alt=修改数量 src="images/update-t-sm.gif" value=修改数量 name=btnModifyQuantity>
<br><br>
<a href="index.jsp"><img border="0" alt="继续购买" src="images/guomai.gif" /></a>
<a href="OrderInfo.jsp"><img alt="" src="images/az-by-split.gif" border="0" /></a>
</TD>
</TR>
<%}else { %>
<tr>
<td>购物车为空!!</td>
</tr>
<%} %>
</table>
</form>
</td>
</tr>
</table>
<jsp:include flush="true" page="footer.jsp"/>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -