📄 order.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<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">
<title>填写订单</title>
<script language="javascript" type="text/javascript">
function validate(form){
var phoneValue =document.getElementById("phone").value;
var codeValue=document.getElementById("code").value;
if(form.name.value==""){
alert("姓名不能为空");
return false;
}
if(form.adress.value==""){
alert("地址不能为空");
return false;
}
if(phoneValue.length!=11){
alert("手机号必须为11位");
return false;
}
if(codeValue.length!=6){
alert("邮编必须为6位");
return false;
}
}
</script>
</head>
<body background="/bookshop/image/background.jpg">
<center>
<h1>请仔细填写订单</h1>
</center>
<TABLE border="1" width="60%" cellspacing="0" bordercolor="#9999FF">
<TR>
<TD width="90">ISBN</TD>
<TD width="269">书名</TD>
<TD width="50">单价</TD>
<TD width="75">数量</TD>
</TR>
<s:set name="items" value="#session.cart.items" />
<s:iterator value="#items">
<TR>
<TD width="90"><s:property value="value.book.isbn" /></TD>
<TD width="269"><s:property value="value.book.bookname" /></TD>
<TD width="50"><s:property value="value.book.price" /></TD>
<TD width="75"><s:property value="value.bookacount" /></TD>
</TR>
</s:iterator>
</TABLE>
<p> </p>
<table width="100%" border="0">
<tr>
<td width="34%"> </td>
<td width="41%">
<div align="center"><a href="shoppingcart.jsp">修改图书订单</a></div>
</td>
<td width="25%"> </td>
</tr>
</table>
<p><font color="#0000FF">如以上信息无误,请填写以下信息并按提交按钮提交订单,完成网上订书:</font></p>
<div style="color:red">
<s:fielderror></s:fielderror>
</div>
<form action="/bookshop/users/checkout" method="post" name="form" onsubmit="return validate(form)">
<s:token name="shopping"></s:token>
<table width="100%" border="0">
<tr>
<td width="17%"><font color="#0000FF">收书人姓名</font></td>
<td width="83%">
<input type="text" name="name" size="10" maxlength="20" id="name">
</td>
</tr>
<tr>
<td width="17%"><font color="#0000FF">订单总金额</font></td>
<td width="83%">
${sessionScope.cart.totalPrice }¥
</td>
</tr>
<tr>
<td width="17%"><font color="#0000FF">发送地址</font></td>
<td width="83%">
<input type="text" name="adress" size="40" maxlength="100" id="adress">
</td>
</tr>
<tr>
<td width="17%"><font color="#0000FF">邮编</font></td>
<td width="83%">
<input type="text" name="code" size="6" maxlength="6" id="code">
</td>
</tr>
<tr>
<td width="17%"><font color="#0000FF">电话</font></td>
<td width="83%">
<input type="text" name="phone" maxlength="11" size="11" id="phone">
</td>
</tr>
<tr>
<td width="17%"><font color="#0000FF"></font></td>
<td width="83%">
<input type="submit" value="提交订单">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -