这在 FF、safari、chrome 和 opera 中运行得很好,但在 IE 中不起作用。
错误代码是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);
}
});
关于jquery - Internet Explorer 中的 AJAX 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6158477/