@ -53,7 +53,7 @@
< div class = "col-xs-12 col-sm-12 col-md-12 wrap" >
<!-- form -->
< form id = "my form" name = "my form" class = "form-horizontal wow fadeInDown" method = "post" action = "#" onSubmit = "return checkContent() " >
< form id = "form" name = "form" class = "form-horizontal wow fadeInDown" >
< div class = "form-group" >
< label for = "title" class = "col-sm-3 control-label left" > 融资公司:< / label >
< div class = "col-sm-6" >
@ -69,31 +69,31 @@
< div class = "form-group" >
< label for = "tel" class = "col-sm-3 control-label left" > 电 话:< / label >
< div class = "col-sm-6" >
< input type = "text" name = "ContactWay " class = "form-control right" id = "tel " placeholder = "必填" >
< input type = "text" name = "phone " class = "form-control right" id = "phone " placeholder = "必填" >
< / div >
< / div >
< div class = "form-group" >
< label for = "tel" class = "col-sm-3 control-label left" > 传 真:< / label >
< div class = "col-sm-6" >
< input type = "text" name = "ContactWay " class = "form-control right" id = "tel " placeholder = "必填" >
< input type = "text" name = "cz " class = "form-control right" id = "cz " placeholder = "必填" >
< / div >
< / div >
< div class = "form-group" >
< label for = "tel" class = "col-sm-3 control-label left" > 电子邮件:< / label >
< div class = "col-sm-6" >
< input type = "text" name = "ContactWay " class = "form-control right" id = "t el" placeholder = "必填" >
< input type = "text" name = "email " class = "form-control right" id = "emai l" placeholder = "必填" >
< / div >
< / div >
< div class = "form-group" >
< label for = "tel" class = "col-sm-3 control-label left" > 联系人:< / label >
< div class = "col-sm-6" >
< input type = "text" name = "ContactWay " class = "form-control right" id = "tel " placeholder = "必填" >
< input type = "text" name = "name " class = "form-control right" id = "name " placeholder = "必填" >
< / div >
< / div >
< div class = "form-group" >
< label for = "tel" class = "col-sm-3 control-label left" > 行业分类:< / label >
< div class = "col-sm-6" >
< select class = "form-select form-select-lg mb-3 apply_select col-sm-6" aria-label = "Default select example" >
< select class = "form-select form-select-lg mb-3 apply_select col-sm-6" name = "cate" id = "cate" aria-label = "Default select example" >
< option selected > 请选择< / option >
< option value = "1" > 行业一< / option >
< option value = "2" > 行业二< / option >
@ -105,21 +105,23 @@
< div class = "form-group" >
< label for = "code" class = "col-xs-12 col-sm-3 control-label left" > 上传商业计划书:< / label >
< div class = "col-xs-7 col-sm-4 pic-show" >
< input type = "text" name = "code" class = "form-control right" id = "code" placeholder = "" >
< / div >
< div class = "col-xs-4 col-sm-4 col-md-2 pic-pic" >
< button class = "btn btn-danger page-btn" > 上传< / button >
< / div >
<!-- <div class="col - xs - 7 col - sm - 4 pic - show"> -->
<!-- <input type="text" name="prospectus" class="form - control right" id="prospectus" placeholder=""> -->
<!-- </div> -->
<!-- <div class="col - xs - 4 col - sm - 4 col - md - 2 pic - pic"> -->
<!-- <button class="btn btn - danger page - btn">上传</button> -->
<!-- <button class="">上传</button> -->
< input type = "file" name = "prospectus" >
<!-- </div> -->
< / div >
< div class = "form-group" >
< div class = "col-sm-offset-4 col-sm-12 sub" >
< button type = "submit" name = "button" value = "提交申请" id = "submit" class = "btn btn-danger page-btn" > 提交申请< / button >
< input class = "button" type = "button" onclick = "apply()" value = "提交申请" >
< / div >
< / div >
< input type = "hidden" name = "__hash__" value = "6e5d808c69f637c3f9c153adb451cd4e_684a5f077a400f78010938d2f396b164" / >
< / form >
< / div >
@ -134,100 +136,70 @@
< SCRIPT language = javaScript >
function CheckJob()
{
if (document.myform.title.value.length==""){
alert ("融资公司不能为空!");
document.myform.title.focus();
return false;
}
if (document.myform.name.value.length==""){
alert ("内容不能为空!");
document.myform.name.focus();
return false;
function apply(){
var formData = new FormData(document.querySelector("#form"));
}
if (document.myform.tel.value.length==""){
alert ("内容不能为空!");
document.myform.tel.focus();
return false;
}
}
$('body').on('click','#submit',function(){
var company = $('#company').val();
var product = $('#product').val();
var num = $('#number').val();
var name = $('#username').val();
var address = $('#address').val();
var phone = $('#phone').val();
var fax = $('#fax').val();
var email = $('#email').val();
var detail = $('#detail').val();
$.ajax({
type: 'post',
dataType: 'text',
// dataType: 'text',
// dataType: 'json',
url: 'https://suzhou.njrenzhou.cn/api.php/apply/apply',
data: {
'product': product,
'num': num,
'name': name,
'company': company,
'address': address,
'phone': phone,
'fax': fax,
'email': email,
'detail': detail
},
beforeSend:function(){
if (!product) {
alert('内容不能为空');
return false;
}
else if (name == '') {
alert('姓名不能为空');
return false;
}
else if (phone == '') {
alert('手机号码不能为空');
return false;
}
else if(!phone.match(/^1(3|4|5|8)\d{1}[-]?\d{4}[-]?\d{4}$/)){
alert('手机号码格式错误');
return false;
}
else return true;
},
success:function(data){
console.log(data);
if (data.msg = 'success') {
data: formData,
processData: false, // 不处理数据
contentType: false, // 不设置内容类型
// beforeSend:function(){
// if (!company) {
// alert('融资公司不能为空');
// return false;
// }
// else if (address == '') {
// alert('地址不能为空');
// return false;
// }
// else if (phone == '') {
// alert('手机号码不能为空');
// return false;
// }
// else if(!phone.match(/^1(3|4|5|8)\d{1}[-]?\d{4}[-]?\d{4}$/)){
// alert('手机号码格式错误');
// return false;
// }
// else if (cz == '') {
// alert('传真不能为空');
// return false;
// }
// else if (email == '') {
// alert('邮箱不能为空');
// return false;
// }
// else if (name == '') {
// alert('姓名不能为空');
// return false;
// }
// else if (cate == '') {
// alert('行业分类不能为空');
// return false;
// }
// else if (prospectus == '') {
// alert('商业计划书不能为空');
// return false;
// }
// else return true;
// },
success:function(res){
console.log(res);
if (res.code == 200) {
alert('提交成功');
window.location.reload();
}else{
alert('提交失败');
alert(res.msg );
}
},
error:function(){
alert('error');
}
})
})
}
< / SCRIPT >