注:使用ajax 提交表单时 type类型最好不用submit 用button合适
function formCheck(){
$.ajax({
type: "post",
url:'/fudaMes/orderInfo/insertOrderInfo',
data:$('#formId').serialize(),// 你的formid
async: true,
error: function(request) {
new PNotify({
title: '提交失败',
text: '信息录入失败',
type: 'error',
styling: 'bootstrap3'
});
},
success: function(data) {
if(data=="success"){
new PNotify({
title: '提交成功',
text: '订单信息已录入',
type: 'success',
styling: 'bootstrap3'
});
}else{
new PNotify({
title: '提交失败',
text: '信息录入失败',
type: 'error',
styling: 'bootstrap3'
});
}
}
});
}