100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > jquery form表单序列化 并ajax实现提交后台

jquery form表单序列化 并ajax实现提交后台

时间:2023-02-25 02:04:01

相关推荐

jquery form表单序列化 并ajax实现提交后台

var serInfo = $("#query_formId").serialize();//查询的数据,jquery form表单序列化

//alert(serInfo);

$.ajax({

type: "post",

url: "queryAttendstatisticsBycod.do",

data:serInfo,

dataType:"json",

success: function(data, textStatus){

if(data.access == true) {//表示登录成功

//重新加载数据

loadData(data.list);

//获得后台查询的页数,设置当前查询的页

//$("#curPage_id").attr("value","1");

}else{

new $.msgbox({

title: '提示',

type: 'alert',

content: '<center><br/><br/>查询出错!</center>',

onClose: function(){

location.href = "index.do";

}

}).show();

}

},

error: function(XMLHttpRequest, textStatus, errorThrown){

new $.msgbox({

title: '提示',

type: 'alert',

content: '<center><br/><br/>查询出错!</center>',

onClose: function(){

location.href = "index.do";

}

}).show();

}

});

1

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。