|
|
|
@ -53,17 +53,17 @@ |
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 wrap"> |
|
|
|
|
|
|
|
|
|
<!-- form --> |
|
|
|
|
<form id="myform" name="myform" class="form-horizontal wow fadeInDown" method="post" action="#" onSubmit="return CheckJob()"> |
|
|
|
|
<form id="myform" name="myform" class="form-horizontal wow fadeInDown" method="post" action="#" onSubmit="return checkContent()"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="title"class="col-sm-3 control-label left">融资公司:</label> |
|
|
|
|
<div class="col-sm-6"> |
|
|
|
|
<input type="text" name="FaqTitle" class="form-control right" id="title" placeholder="必填"> |
|
|
|
|
<input type="text" name="company" class="form-control right" id="company" placeholder="必填"> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="username" class="col-sm-3 control-label left">地址:</label> |
|
|
|
|
<div class="col-sm-6"> |
|
|
|
|
<input type="text" name="Contact" class="form-control right" id="username" placeholder="必填"> |
|
|
|
|
<input type="text" name="address" class="form-control right" id="address" placeholder="必填"> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="form-group"> |
|
|
|
@ -114,7 +114,7 @@ |
|
|
|
|
</div> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<div class="col-sm-offset-4 col-sm-12 sub"> |
|
|
|
|
<button type="submit" name="button" value="提交申请" class="btn btn-danger page-btn">提交申请</button> |
|
|
|
|
<button type="submit" name="button" value="提交申请" id="submit" class="btn btn-danger page-btn">提交申请</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<input type="hidden" name="__hash__" value="6e5d808c69f637c3f9c153adb451cd4e_684a5f077a400f78010938d2f396b164" /> |
|
|
|
@ -170,4 +170,64 @@ function CheckJob() |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$('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: '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') { |
|
|
|
|
alert('提交成功'); |
|
|
|
|
window.location.reload(); |
|
|
|
|
}else{ |
|
|
|
|
alert('提交失败'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
error:function(){ |
|
|
|
|
alert('error'); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
</SCRIPT> |