您现在的位置:首页 >> 前端 >> 内容

Jquery设置Session过期处理,处理Ajax提交文件的问题(代码)

时间:2018/4/6 16:11:46 点击:

  核心提示:Jquery设置Session过期处理,处理Ajax提交文件的问题(代码) $.ajaxSetup({ type:GET,//或者用POST Content-Type:application/x-...

Jquery设置Session过期处理,处理Ajax提交文件的问题(代码)

	$.ajaxSetup({
		type:"GET",//或者用POST
		Content-Type:"application/x-www-form-urlencoded;charset=utf-8",
		complete:function(xhr,stauts){
			//后台设置
			var stasu=xhr.getResponseHeader("sessionstatus");
			if (status=="timeout"){
				//处理session过期
			}
		}
		
	})

Tags:JQ QU UE ER 
作者:网络 来源:douyunqian