📄 productinfo.tag
字号:
<%--购物车商品信息 --%>
<%@ tag pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" >
<!--
function reflashCart()
{
var url = '${pageContext.request.contextPath}/shopcart.do';
var param = "cookiestr="+getCookie('shopcart');
var a=new Ajax.Request(
url,
{
method:'get',
parameters:param,
onComplete:deal
});
}
function deal(ajax)
{
//alert(ajax.responseText);
$("UpdatePanel1").innerHTML=ajax.responseText;
}
function doDelete(pid,pname,cid)
{
var confirmstr = "确定删除商品";
if(pname!=null) {confirmstr=confirmstr+" 『"+pname+"』 ";}
confirmstr+="?";
if(window.confirm(confirmstr))
{
deleteProduct(pid,cid);
reflashCart();
alert('删除成功!');
}
}
function doModify(pid,amt,cid)
{
if(window.confirm("确定修改商品数量?"))
{
modifyProduct(pid,amt,cid);
reflashCart();
alert('修改成功!');
}
}
//alert(getCookie('shopcart'));
//-->
</script>
<div id="UpdatePanel1">
<c:forEach items="${requestScope.goods}" var="cart">
<div class="ProductList" onmouseover="this.className='ProductListOn'" onmouseout="this.className='ProductList'" id="${cart.product.id }">
<div class="ProductList-th-r">
<input id="pri${cart.product.id }" style="display: none;" value="${cart.product.price }"/>
<div class="ProductTitle" >
${cart.product.formatPrice }
</div>
<div class="ProductTitle">
${empty cart.color ? '暂无颜色' : cart.color.colorname}
</div>
<div class="ProductTitle">
<input name="rpProduct$ctl00$tbQuantity" type="text" value="${cart.amount }"
onchange="javascript:doModify(${cart.product.id },$F('inp${cart.product.id }'));"
onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;"
id="inp${cart.product.id }" title="1002855-0-False" style="width:50px;" />
</div>
<div class="ProductTitle">
${cart.formatSubtotal }
</div>
<div class="ProductTitle">
<a id="rpProduct_ctl00_btnDelete" href="javascript:doDelete(${cart.product.id },'${cart.product.pname }');">删除</a>
</div>
</div>
<div class="ProductList-th-l">
<a href='productinfo.htm?pid=${cart.product.id }' target='_blank'>${cart.product.pname }</a>
</div>
</div>
</c:forEach>
<div id="ProductBottomDiv">
<div id="ProductBottom-l">
<a href="javascript:closeWindow();"><img src="images/product/continue.gif" border="0" /></a>
</div>
<div id="ProductBottom-c">
<b>商品金额总计:¥
<font style="color:Red">
<span id="lbTotalPrice">
${total }
</span>
</font>元
</b>
</div>
<div id="ProductBottom-r">
<a href="checkout.htm"><img src="images/product/checkout.gif" /></a>
</div>
</div>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -