<form>
<div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-3">
<input type="button" class="btn btn-info" value="重置" onclick="return resetaa()">
<input type="button" class="btn btn-success" value="提交" onclick="return formcheck()">
</form>
<script type="text/javascript">
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'
});
}
}
});
}
</script>