我使用的是HTML5,jQuery 1.6.1和jQuery Mobile 1.0.1。
我使用以下代码进行Ajax请求。在Chrome中运行正常,但在测试Firefox 14.0.1时出现以下错误:
在窗口上下文中同步模式下不再支持XMLHttpRequest的withCredentials属性。
代码:
$.ajax({
type: "GET",
dataType: "json",
async: false,
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', make_base_auth(UserId, Password));
},
xhrFields: {
withCredentials: true
},
success:function(data){
console.log("Success");
},
error:function(xhr,err){
console.log("Failed" );
}
});
请帮我解决这个问题。