AJAX问题在Internet Explorer
问题描述:
这在FF,Safari浏览器,Chrome和Opera非常好,但在IE浏览器没有。AJAX问题在Internet Explorer
错误代码是403
var datau = "trends.php%3Frastgele%3D33";
$.ajax({
type: "GET",
url: "loader.php?kk=1&page="+datau,
data: "",
cache: false,
success: function (html) {
$('#content').empty();
$('#content').html(html);
},
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.status);
alert(thrownError);
}
});
答
现在应当经URL GET变量。 以下是推荐的(不要做urlencode):
$.ajax({
type: "GET",
url: "loader.php",
data: {"kk": 1, "page": 'trends.php?rastgele=33'},
cache: false,
success: function (html) {
$('#content').empty();
$('#content').html(html);
},
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.status);
alert(thrownError);
}
});
什么是您的完整HTTP 403错误? [有很多403错误](http://en.wikipedia.org/wiki/HTTP_403)。 – 2011-05-27 23:09:32
HTTP 403意味着服务器认为该请求被要求的东西不应该(禁止)。你能发布你的服务器日志吗? – buruzaemon 2011-05-27 23:10:28
[错误] [客户115.64.xx.xx]文件不存在:/home/sitename/public_html/403.shtml,引用者:http://www.sitename.com/trends.php?rastgele=33 还, 115.64.xx.xx - - [27 /月/ 2011:18:18:32 -0500] “GET /loader.php?kk=1&page=trends.php%3Frastgele%3D33 HTTP/1.1” 403 9“ http://www.sitename.com/trends.php?rastgele=33“”Mozilla/5.0(兼容; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)“ 仅适用于Internet Explorer – 2011-05-27 23:17:45