📄 confirm.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>美讯集团产品发布平台</title>
<LINK id=MainCss href="/Store/css/style.css" type="text/css"
rel=stylesheet>
<SCRIPT language=javascript src="/BookShop/css/Ajax_IndexLoad.js"
type=text/javascript charset=gb2312> </SCRIPT>
<script language="javascript">
function isMadeOf(val,str){
var jj;
var chr;
for (jj=0;jj<val.length;++jj){
chr=val.charAt(jj);
if (str.indexOf(chr,0)==-1)
return false;
}
return true;
}
function forPhone(obj){
var phoneStr= "()-#0123456789";
if (!isMadeOf(obj.value,phoneStr)){
flag = 1;
return false;
}
return true;
}
function forPostalcode(obj){
var postalcode= "0123456789";
if (!isMadeOf(obj.value,postalcode)){
flag = 1;
return false;
}
return true;
}
function verifyUsername(strUsername){
var myReg = /^[_a-zA-Z0-9_-_@_._.]+\w$/;
if(myReg.test(strUsername))
return true;
else
return false;
}
function isEmail(s){
if (s.length > 100)
return false;
var regu="^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[_.0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$";
var re = new RegExp(regu);
if (s.search(re) != -1)
return true;
else
return false;
}
function check(){
if(document.conform.uname.value.replace(/(^\s*)|(\s*$)/g, "")==""){
alert("用户姓名不能为空!");
document.conform.uname.focus();
return false;
}
if(document.conform.email.value.replace(/(^\s*)|(\s*$)/g, "")==""){
alert("Email不能为空!");
document.conform.email.focus();
return false;
}
if(document.conform.email.value.replace(/(^\s*)|(\s*$)/g, "")!=""){
if(!isEmail(document.conform.email.value)){
alert("Email输入有误,请检查!");
document.conform.email.focus();
return false;
}
}
if(document.conform.phone.value.replace(/(^\s*)|(\s*$)/g, "")==""){
alert("电话不能为空!");
document.conform.phone.focus();
return false;
}
if(document.conform.phone.value.replace(/(^\s*)|(\s*$)/g, "")!=""){
if(!forPhone(document.conform.phone)){
alert("电话值不正确!请填写数字,可以包含(,),-,#符号");
document.conform.phone.focus();
return false;
}
}
if(document.conform.zip.value.replace(/(^\s*)|(\s*$)/g, "")==""){
alert("邮编不能为空!");
document.conform.zip.focus();
return false;
}
if(document.conform.zip.value.replace(/(^\s*)|(\s*$)/g, "")!=""){
if(!forPostalcode(document.conform.zip)){
alert("所填邮编不正确!请填写数字");
document.conform.zip.focus();
return false;
}
}
if(document.conform.address.value.replace(/(^\s*)|(\s*$)/g, "")==""){
alert("地址不能为空!");
document.conform.address.focus();
return false;
}
document.conform.submit();
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
session.setAttribute("url", request.getRequestURI());
%>
<%@ include file="./Head.jsp"%>
<table width="742" border="0" align="center" cellpadding="0"
cellspacing="0" bgcolor="669999">
<tr>
<td height="20" colspan="3">
</td>
</tr>
<tr>
<td width="170" height="20" valign="top" bgcolor="669999">
<%@ include file="./Login.jsp"%>
</td>
<td width="8">
</td>
<td width="559" valign="top" bgcolor="#669999">
<table width="100%" border="0">
<tr>
<td class="w-1">
<b>商品信息:</b>
<c:if test="${flag!=null&&flag=='no'}">
信息有误,无法提交订单!
</c:if>
</td>
</tr>
</table>
<hr>
<c:forEach var="order" items="${GoodsCar}">
<table width="100%" border="0" class="w-1">
<tr>
<td width="17%" height="25">
<div align="right">
产品编号:
</div>
</td>
<td width="33%" height="25">
${order.btid}
</td>
<td width="19%" height="25">
<div align="right">
产品名称:
</div>
</td>
<td width="31%" height="25">
${order.bname }
</td>
</tr>
<tr>
<td height="25">
<div align="right">
产品单价:
</div>
</td>
<td height="25">
${order.bprice }
</td>
<td height="25">
<div align="right">
所购数量:
</div>
</td>
<td height="25">
${order.osnumber }
</td>
</tr>
<tr>
<td height="25">
<div align="right">
小 计:
</div>
</td>
<td height="25">
${order.sumprice }
</td>
<td height="25">
<div align="right"></div>
</td>
<td height="25">
</td>
</tr>
</table>
<hr>
</c:forEach>
<table width="100%" border="0">
<tr>
<td width="69%" class="w-1">
<div align="right">
<b>总价格:</b>
</div>
</td>
<td width="31%" class="w-1">
<b>${sum}</b>
</td>
</tr>
</table>
<table width="100%" border="0" class="w-1">
<tr>
<td height="30">
<b>用户信息:</b>
</td>
</tr>
</table>
<form name="conform" method="post" action="../OrderServlet">
<table width="100%" border="0" class="w-1">
<tr>
<td width="15%" height="25">
<div align="right">
联系人:
</div>
</td>
<td width="40%" height="25">
<label>
<input type="text" name="uname" value="${user.utname }">
</label>
</td>
<td width="13%" height="25">
<div align="right">
联系电话:
</div>
</td>
<td width="32%" height="25">
<label>
<input name="phone" type="text" size="15"
value="${user.uphone }">
</label>
</td>
</tr>
<tr>
<td height="25">
<div align="right">
E-mail:
</div>
</td>
<td height="25">
<label>
<input name="email" type="text" size="30"
value="${user.uemaile }">
</label>
</td>
<td height="25">
<div align="right">
邮编:
</div>
</td>
<td height="25">
<label>
<input name="zip" type="text" size="15"
value="${user.uzip }">
</label>
</td>
</tr>
<tr>
<td height="25">
<div align="right">
地 址:
</div>
</td>
<td height="25" colspan="3">
<label>
<input name="address" type="text" size="47"
value="${user.uaddress }">
</label>
</td>
</tr>
<tr>
<td height="22" colspan="4" valign="bottom">
客人附加要求:
</td>
</tr>
<tr>
<td height="25" colspan="4">
<textarea name="remark" cols="63" rows="7"></textarea>
</td>
</tr>
<tr>
<td colspan="4">
<label></label>
</td>
</tr>
<tr>
<td colspan="4">
<div align="right">
<br>
<input type="hidden" name="action" value="confirm">
<a href="#"
style='cursor: hand ; text-decoration : none; color: #FFFFFF'
onclick="check()"><font class="w-3">提交订单</font> </a>
</div>
</td>
</tr>
</table>
<br>
<br>
<br>
</form>
</td>
</tr>
</table>
<%@ include file="./Tail.jsp"%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -