📄 buycart.jsp
字号:
<%@ include file="/_head.jsp"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<script language="javascript" src="/pay/buycart.js" type="text/JavaScript"></script>
<div id="main" style="border:#cccccc 0px solid;width:1004px;float:left;">
<div>
<table cellspacing="0" cellpadding="0" width="100%" border="1" style="border-collapse: collapse" bordercolor="#CCCCCC" height="134">
<tr>
<td align="center" height="29" bgcolor="#FFFFCC">您好 ,感谢您的选购。</td>
</tr>
<tr>
<td style="padding:8px; line-height:150%" height="105" align="center" valign="top">
<table cellpadding="0" cellspacing="0" style="padding:5px; border-collapse:collapse" width="100%" id="AutoNumber5" border="1">
<tr>
<td width="34%" height="29" bgcolor="#CCCCCC"> 商品名称</td>
<td width="9%" align="center" height="29" bgcolor="#CCCCCC">数量</td>
<td width="17%" align="center" height="29" bgcolor="#CCCCCC">单价</td>
<td width="20%" align="center" height="29" bgcolor="#CCCCCC">金额</td>
<td width="20%" align="center" height="29" bgcolor="#CCCCCC">取消</td>
</tr>
<%
HashMap cart = (HashMap)session.getAttribute("CART");
Vector goods = (Vector)cart.get("GOODS");
GenericVO ovo = null;
int total = 0;
int dot = 0;
for(int i=0;i<goods.size();i++){
ovo = (GenericVO)goods.elementAt(i);
total += BaseUtil.toInt(ovo.getItem("PRICE2"))*BaseUtil.toInt(ovo.getItem("COUNT"));
dot += BaseUtil.toInt(ovo.getItem("DOT"))*BaseUtil.toInt(ovo.getItem("COUNT"));
%>
<tr>
<td width="34%" height="36"><%=ovo.getItem("NAME")%></td>
<td width="9%" align="center" height="36"><input onchange="onCountChange(<%=i%>, this.value);" type="text" name="count" value="<%=ovo.getItem("COUNT")%>" size="3"/></td>
<td width="17%" align="center" height="36"><%=ovo.getItem("PRICE2")%></td>
<td id="total<%=i%>" width="20%" align="center" height="36"><%=ovo.getItem("TOTAL")%></td>
<td width="20%" align="center" height="36"><a onclick="return confirm('确实要取消吗?');" href="/main.do?event=doCartDelete&id=<%=i%>">取消</a></td>
</tr>
<%
}
cart.put("TOTALPRICE", ""+total);
session.setAttribute("CART", cart);
%>
</table>
<form name="countchange" style="display:none;" target="frmHidden" action="/main.do?event=doBuyCartChange" method="POST">
<input type="hidden" name="id" />
<input type="hidden" name="count" />
</form>
<br>
<hr color="#C0C0C0" size="1">
<p align="right">您已经选购了 <span><font color="#ff0000" size="3"><strong><%=goods.size()%></strong></font></span> 种 商品,总金额:<font color="#ff0000" size="3"><strong id="total"><%=total%></strong></font> 元<br>
获得积分:<font color="#ff0000" size="3"><strong id="dot"><%=dot%></strong></font> 分<br>
<br>
<a href="/"><img border="0" src="/images/icon_continue-shopping.gif" width="81" height="22" alt=""></a>
<%
if(AppUtil.isLogin(session)){
%>
<a href="/main.do?event=toPaySelectAddr">
<%
}
else{
%>
<a id="aToPay" href="javascript:alert('对不起,您还没有登陆,请先登陆!');">
<%
}
%>
<img border="0" src="/images/icon_checkout.gif" width="80" height="22" alt=""></a></p>
<p>
</td>
</tr>
</table>
</div>
</div>
<div style="height:20px; width:1004px;"> </div>
<%@ include file="/_foot.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -