order.aspx 订单页- order-detail.aspx订单确认页- 操作:order.aspx提交订单@1,跳转到order-detail.aspx页面,确认页面操作:返回上一步@2- 提交@3- order-success.aspx成功提交订单页
@1:<input type="button" class="line_next" value="" onclick="return lineOrderSubmit();" />
js部分:
function lineOrderSubmit() { var ret=validateContactorFrom(); if(ret) ret= validateUserInfoForm("1"); // if(ret) // ret=validateIsAgree(); if(ret) { document.getElementById("form1").method="post"; document.getElementById("form1").action="order-detail.aspx"; document.getElementById("form1").submit(); } else return false; }
validateUserInfoForm为验证方法
@2:<input type="button" class="line_pre" onclick="back()" value="" />
js部分:
function back() {
document.getElementById("form1").action = "order.aspx";
document.getElementById("form1").submit();
}
@3:<input type="button" class="line_summit" onclick="return OrderSummit()" value="" />
js部分:
function OrderSummit() {
if (!$("#cb_agree").attr("checked")) {
alert("请仔细阅读合同条款并在下方打勾");
return false;
}
document.getElementById("form1").action = "order-success.aspx";
document.getElementById("form1").submit();
}