<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>预订装修</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<%-- <script type="text/javascript" src="<%=basePath%>js/plugback.js"></script> --%>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<%-- <script src="<%=basePath%>js/alert.js"></script> --%>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript">
$(function(){
window.onload = getRunTime();
function getRunTime() {
$.ajax({
type : "POST",
url : "ordersubTimes.action",
success : function(data1){
if(data1.success = true){
var time = data1.times;
$("<option value=0>请输入到达时间</option>").appendTo($("#time"));
var i = 0;
while (i < time.length) {
if (time[i] == null) {
break;
}
var li = $("<option value="+time[i]+">" + time[i]
+ "</option>");
$(li).appendTo($("#time"));
i++;
}
}
}
});
};
window.onload = getType();
function getType(){
$.ajax({
type : "POST",
url : "findDongType.action",
success : function(data){
var list = data.list;
$("<option value=\"\">请选择装修类型</option>").appendTo($("#typefirst"));
for(var i=0;i<list.length;i++){
var li = "<option value=\""+list[i].id+"\">"+list[i].typeName+"</option>";
$(li).appendTo($("#typefirst"));
}
}
});
};
window.onload = getType1();
function getType1(){
$("#typefirst").live("change", function(){
var aa = $("#typefirst").val();
$.ajax({
type : "POST",
data : "typeId="+aa,
url : "findDfRoomById.action",
success : function(data1){
var list1 = data1.list;
$("#typeseconed").empty();
$("<option value=\"\">请选择装修名称</option>").appendTo($("#typeseconed"));
for(var i=0;i<list1.length;i++){
var li = "<option value=\""+list1[i].id+"\">"+list1[i].name+"</option>";
$(li).appendTo($("#typeseconed"));
}
}
});
});
}
});
$(document).ready(function(){
$("#showsubmit").click(function(){
var name1 = $("#truename").val();
var name = encodeURIComponent(name1);
var type1 = $("#typefirst").find("option:selected").text();
var type = encodeURIComponent(type1);
var nametype1 = $("#typeseconed").find("option:selected").text();
var nametype = encodeURIComponent(nametype1);
var sex1 = $("#sex").val();
var sex = encodeURIComponent(sex1);
var tel = $("#phone").val();
var orderTime = $("#time").val();
var content1 = $("#content").val();
var content = encodeURIComponent(content1);
if(name==''){
alert('姓名不能为空!');
return;
};
if(sex==''){
alert('请选择性别!');
return;
};
if(type == ''){
alert('请选择类型');
return;
}
if(nametype == ''){
alert("请选择装修名称!");
return;
}
if($("#phone").val()==''){
alert('请输入你的联系方式!');
return;
};
if($('#time').val()==''){
alert('请输入到达时间!');
return;
};
$.post("<%=basePath%>addSub.action?tel=" + tel+"&name="+name+"&type="+type+"&orderTime="+orderTime+"&sex="+sex+"&content="+content+"&nametype="+nametype, "", getResult);
});
//获得用户信息保存的结果
function getResult(data) {
if (data.success == true) {
alert("预订成功,请保持手机畅通,我们会在5分钟之内与您联系!");
} else {
alert("提交失败,请重新申请!");
}
document.getElementById("truename").value="";
document.getElementById("phone").value="";
document.getElementById("time").value="";
document.getElementById("content").value="";
document.getElementById("showsubmit").disabled='disabled';
}
});
//验证联系方式
function validTeleNum(){
var tel =/(^[0-9]{3,4}[0-9]{7,8}$)|(^[0-9]{7,8}$)|(^[0-9]{3,4}\-[0-9]{7,8}$)|(^[0-9]{7,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/;
if (document.getElementById("phone").value !='') {
if(!tel.test(document.getElementById("phone").value)){
alert("联系电话格式不正确,请重新输入!");
document.getElementById("phone").value ="";
}
}
}
</script>
<style type="text/css">
.up_top_1 li h3 {
border-bottom: 1px dotted #C6C6C6;
font-weight: normal;
padding: 10px 0;
text-align: left;
}
.up_top_1 li {
width: 90%;
color: #720705;
padding: 0 10px;
list-style-type: none;
}
.up_top_2 {
padding: 5px 5px;
text-align: left;
}
#storeName{
float: right;
}
.rig_r{
float: right;
}
.sch_m_t{
margin-top: 30px;
}
.sch_m_t a{
color: #720705;
}
#schedu{
margin-left: 5%;
width: 95%;
margin-top: 20px;
}
.textarea {
position: relative;
background-color: transparent;
color: #999999;
display: block;
width: 100%;
margin: 10px 0;
padding: 0 10px;
font-family: Arial, Helvetica, sans-serif;
border: 0;
overflow: auto;
-webkit-appearance: none;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border: 1px solid #E8E8E8;
margin: 5px 0 5px;
padding: 5px 10px;
height: 99px;
overflow-y: visible
}
.up_top_5 {
position: relative;
background-color: transparent;
color: #6d0101;
display: block;
width: 100%;
font-family: Arial, Helvetica, sans-serif;
border: 0;
-webkit-appearance: none;
}
.up_top_5[type="text"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
border-radius: 3px 3px 3px 3px;
border: 1px solid #E8E8E8;
padding: 5px 0;
color: #6d0101;
}
.textarea[type="textarea"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
color: #6d0101;
}
.up_top_5 {
margin: 5px 0 4px;
border: 1px solid #E8E8E8;
}
.up_top_4 th {
color: #720705;
font-size: 16px;
font-weight: normal;
padding: 0;
text-align: left;
width: 79px;
}
.col{
color: #720705;
}
.select {
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
background-color: #FFFFFF;
border: 1px solid #E8E8E8;
margin: 5px 0 4px;
padding: 5px 0px;
width: 100%;
-webkit-appearance: button;
-webkit-user-select: none;
overflow: visible;
text-overflow: ellipsis;
white-space: nowrap;
color: #6d0101;
display: inline;
position: relative;
height: auto;
outline: none;
background-color: transparent;
}
.select_sel{
width: 40px;
}
.select_sel_ma{
margin-left: -30px;
margin-right: 10px;
}
.submit[type="button"] {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
width: 100%;
}
.submit {
background-color: #520202;
padding: 10px 20px;
text-decoration: none;
border: 1px solid #360101;
background-image: linear-gradient(bottom, #520202 0%, #780101 100%);
background-image: -o-linear-gradient(bottom, #520202 0%, #780101 100%);
background-image: -moz-linear-gradient(bottom, #520202 0%, #780101 100%);
background-image: -webkit-linear-gradient(bottom, #520202 0%, #780101 100%);
background-image: -ms-linear-gradient(bottom, #520202 0%, #780101 100%);
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #520202), color-stop(1, #780101));
-webkit-box-shadow: 0 1px 0 #9d0606 inset, 0 1px 2px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 1px 0 #9d0606 inset, 0 1px 2px rgba(0, 0, 0, 0.5);
box-shadow: 0 1px 0 #9d0606 inset, 0 1px 2px rgba(0, 0, 0, 0.5);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
color: #e9bf00;
display: block;
text-align: center;
text-shadow: 0 1px rgba(0, 0, 0, 0.2);
}
.submit:active {
padding-bottom: 9px;
padding-left: 20px;
padding-right: 20px;
padding-top: 11px;
top: 0px;
background-image: linear-gradient(bottom, #780101 0%, #520202 100%);
background-image: -o-linear-gradient(bottom, #780101 0%, #520202 100%);
background-image: -moz-linear-gradient(bottom, #780101 0%, #520202 100%);
background-image: -webkit-linear-gradient(bottom, #780101 0%, #520202 100%);
background-image: -ms-linear-gradient(bottom, #780101 0%, #520202 100%);
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #780101), color-stop(1, #520202));
-webkit-box-shadow: 0 1px 0 #780101 inset, 0 1px 2px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 1px 0 #780101 inset, 0 1px 2px rgba(0, 0, 0, 0.5);
box-shadow: 0 1px 0 #780101 inset, 0 1px 2px rgba(0, 0, 0, 0.5);
}
#foo_sub{
margin-top: 30px;
width: 30%; margin: auto;
}
.bod_def{
background: url("<%=basePath%>images/bj_4.jpg");
background-repeat:no-repeat;
background-attachment: scroll;
background-size:100% 100%;
}
img{
width: 100%;
}
</style>
</head>
<body class="bod_def">
<div class="up_top" style="width: 95%;margin: auto;position: relative;">
<!-- <ul class="up_top_1" style="margin-top: 20px;">
<li class="">
<h2>订单说明</h2>
<div class="up_top_2"><span id="shuoming"></span></div>
</li>
</ul> -->
<ul class="up_top_1 up_top_2 sch_m_t">
<li>
<span>地址:世纪商贸城四区一栋10号</span>
</li>
<li>
<a href="tel:8800-0666" style="text-decoration: none;">
<span>预订电话:15076759985</span>
</a>
</li>
</ul>
<ul class="up_top_1" style="">
<li class="up_top_3 li0" style="border-bottom:none;margin-bottom: -5px;">
<span>请认真填写表格</span>
</li>
<li class="li1" style="border-radius:0px 0px 0px 0px;border-top:none;">
<table class="up_top_4" width="100%; cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th>联系人</th>
<td>
<input id="truename" class="up_top_5" type="text" placeholder="请输入您的真实姓名" name="truename">
</td>
</tr>
</tbody>
</table>
</li>
<li class="li1" style="border-top: none;border-radius:0px 0px 0px 0px;">
<table class="up_top_4" width="100%; cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th>性别</th>
<td>
<select id="sex" class="select" name="sex">
<option value="" selected="selected">请选择性别</option>
<option value="男">男</option>
<option value="女">女</option>
</select>
</td>
</tr>
</tbody>
</table>
</li>
<li class="li1" style="border-top:none;border-radius:0px 0px 0px 0px;">
<table class="up_top_4" width="100%; cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th>联系电话</th>
<td>
<input id="phone" class="up_top_5" type="text" placeholder="请输入您的联系方式" name="truename" onblur="validTeleNum()">
</td>
</tr>
</tbody>
</table>
</li>
<li class="li1" style="border-top: none;border-radius:0px 0px 0px 0px;">
<table class="up_top_4" width="100%; cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th>装修类型</th>
<td>
<select id="typefirst" class="select" name="type">
<!-- <option value="" selected="selected">请选择装修类型</option>
<option value="0">西湖</option>
<option value="1">杭州</option> -->
</select>
</td>
</tr>
</tbody>
</table>
</li>
<li class="li1" style="border-top: none;border-radius:0px 0px 0px 0px;">
<table class="up_top_4" width="100%; cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th>装修名称</th>
<td>
<select id="typeseconed" class="select" name="name">
<!-- <option value="" selected="selected">请选择装修类型</option>
<option value="0">西湖1</option>
<option value="1">西湖2</option> -->
</select>
</td>
</tr>
</tbody>
</table>
</li>
<li class="li1" style="border-top: none;border-radius:0px 0px 0px 0px;">
<table class="up_top_4" width="100%; cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th>到店时间</th>
<td>
<select id="time" class="select" name="time">
</select>
</td>
</tr>
</tbody>
</table>
</li>
<li class="li1" style="border-top: none;border-radius:0px 0px 3px 3px;">
<table class="up_top_4" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th class="beizhu" valign="top" style="padding:10px 0 0 0;">备注</th>
<td>
<textarea style="color:#6d0101;" id="content" name="info" class="textarea" style=" height:99px;overflow-y:visible" id="beizhu" placeholder="请输入备注信息"></textarea>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<div class="up_button" style="width: 90%;margin: auto;">
<input id="showsubmit" class="submit" type="button" value="提交订单">
</div>
</div>
</body>
</html>
html 输入
最新推荐文章于 2025-01-21 16:50:52 发布
2255

被折叠的 条评论
为什么被折叠?



