📄 productchange.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>产品兑换</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="${pageContext.request.contextPath }/image/main.css"
rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath }/image/shh.css"
rel="stylesheet" type="text/css">
<style type="text/css">
input {
font-size:12px;
}
</style>
<script type="text/javascript">
function changeProduct(){
var point = ${intergralConsumeForm.product.point };
var totalIntergral = ${intergralConsumeForm.totalIntergral };
var productstorage = ${intergralConsumeForm.product.productstorage };
var productnum = document.getElementById("productnum").value;
var consume = point*productnum;
if(productnum<1){
alert("输入要兑换的物品数量");
}
if(productstorage!=-1 && productstorage<productnum){
alert("所选择物品的数量不足");
}
else if(consume>totalIntergral){
alert("所选择物品的分数超过用户总积分");
}
else{
if(confirm("总共花费积分"+consume+"兑换"+productnum+"件${intergralConsumeForm.product.productname }")){
editForm.submit();
window.setTimeout(window.close(),"1000");
}
}
}
</script>
</head>
<body style="z-index: 1;text-align: center;">
<html:form action="/intergralConsume.do" styleId="editForm" target="result">
<input type="hidden" name="task" value="changeProduct" id="task"/>
<input type="hidden" name="point" value="${intergralConsumeForm.product.point }" id="point"/>
<html:hidden property="productid" value="${intergralConsumeForm.product.productid }"/>
<table width="560px" height="250" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#D71920" style="margin: 10px">
<tr><td>
<table border="0" cellpadding="0" cellspacing="0" width="520" align="center" id="ttc">
<tr><td colspan="5" height="20px"> </td></tr>
<tr>
<td width="130" height="27" align="right">物品名称:</td>
<td width="10" align="left"> </td>
<td width="160" align="left">${intergralConsumeForm.product.productname }</td>
<td width="210" rowspan="5" align="left" valign="middle">
<div style="height: 120px;width: 180px;padding: 8px;" id="ttc">${intergralConsumeForm.product.productintroduce }</div>
</td>
</tr>
<tr id="ttc">
<td height="27" align="right">所需积分:</td>
<td align="left"> </td>
<td align="left">${intergralConsumeForm.product.point }</td>
</tr>
<tr id="ttc">
<td height="27" align="right">物品类型:</td>
<td align="left"> </td>
<td align="left">${intergralConsumeForm.product.sortname }</td>
</tr>
<tr id="ttc">
<td height="27" align="right">商家:</td>
<td align="left"> </td>
<td align="left">${intergralConsumeForm.product.productor }</td>
</tr>
<tr id="ttc">
<td height="27" align="right">物品库存:</td>
<td align="left"> </td>
<td align="left">
<c:if test="${intergralConsumeForm.product.productstorage==-1}">
无限量
</c:if>
<c:if test="${intergralConsumeForm.product.productstorage!=-1}">
${intergralConsumeForm.product.productstorage }
</c:if>
</td>
</tr>
<tr id="ttc">
<td height="27" colspan="1" align="right">输入兑换的数量:</td>
<td align="left"> </td>
<td colspan="1" align="left">
<input type="text" name="productnum" id="productnum" size="5" maxlength="5" value="0"/>
<input type="button" value=" 兑 换 " onclick="changeProduct();"/>
<input type="button" value=" 返 回 " onclick="window.close();"/>
</td>
</tr>
<tr><td colspan="5" height="20px"> </td></tr>
</table>
</td></tr>
</table>
</html:form>
<iframe style="display:none;" name="result"></iframe>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -