ajax提交数据后Action中的程序未执行完毕,页面却已经显示响应结果error

前端之家收集整理的这篇文章主要介绍了ajax提交数据后Action中的程序未执行完毕,页面却已经显示响应结果error前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
                     $.ajax({
				timeout:10000,type : "post",dataType : "json",async : false,// 加上这一句就可以正常运行
				url : "userAction_userLogin.action",data : {
					account : userAccount,pwd : password
				},success : function(response) {
					
					alert(response.string);
					window.navigate("jsp/device_management.jsp");
					window.location.href="jsp/device_management.jsp"

				},error : function(xhr,textStatus,errMsg) 
		        {
		        	alert("登录失败! "+xhr+errMsg+textStatus);
		       	}
			});
原文链接:https://www.f2er.com/ajax/162405.html

猜你在找的Ajax相关文章