📄 basket.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ page import="omega.domain.Shopcart"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'b.jsp' starting page</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 rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" language="javascript">
function clean(){
var f=document.CarForm;
f.action="DelShopCar.do?action=del";
f.submit();
}
function goorder(){
var f=document.CarForm;
f.action="Paymethod.do";
f.submit();
}
</script>
</head>
<%
List list=(List)request.getAttribute("shopcar");
%>
<body><br>
<html:form action="ModifyShopCar.do">
<table width="99%" border="0">
<tr>
<td colspan="5">
<div align="center" class="ctr">
<strong>所选的购物信息</strong>
</div>
<br></td>
</tr>
<tr>
<td width="25%">
<div align="center">
商品名称
</div>
<br></td>
<td width="11%">
<div align="center">
数量
</div>
<br></td>
<td width="24%">
<div align="center">
单价(元)
</div>
<br></td>
<td width="23%">
<div align="center">
小计(元)
</div>
<br></td>
<td width="17%">
<div align="center">
操作</div>
<br></td>
</tr>
<%
if(list!=null){
for(int i=0;i<list.size();i++){
Shopcart sc=(Shopcart)list.get(i);
%>
<tr>
<td>
<div align="center">
<html:text property="productname" size="6" value="<%=sc.getProductname()%>" readonly="true" />
<html:hidden property="id" value="<%=String.valueOf(sc.getId())%>" />
<html:hidden property="productid" value="<%=String.valueOf(sc.getProductid())%>" />
</div>
<br></td>
<td>
<label>
<div align="center">
<html:text property="count" size="4" value="<%=String.valueOf(sc.getCount())%>" />
</div>
</label>
<br></td>
<td>
<div align="center">
<html:text property="saleprice" size="10"
value="<%=String.valueOf(sc.getSaleprice())%>" readonly="true"/>
</div>
<br></td>
<td>
<div align="center">
<label></label>
<label>
<html:text property="price" size="10"
value="<%=String.valueOf(sc.getPrice())%>" readonly="true"/>
</label>
</div>
<br></td>
<td>
<div align="center">
<html:checkbox property="del" value="<%=String.valueOf(sc.getId())%>" />
</div>
<br></td>
</tr>
<%}} %>
</table>
<table width="99%" border="0">
<tr>
<td height="14" colspan="2">
<label>
<div align="center">
<html:submit value="确定"/>
</div>
</label>
<br></td>
</tr>
<tr>
<td>
<div align="right">
<input type="button" name="button2" value="清空购物车" onClick="clean();">
</div>
</td>
<td>
<label>
<input type="button" name="button3" value="收银台付款" onClick="goorder();">
</label>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</table>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -