2011-05-27 114 views
2

這在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); 
      } 
}); 
+0

什麼是您的完整HTTP 403錯誤? [有很多403錯誤](http://en.wikipedia.org/wiki/HTTP_403)。 – 2011-05-27 23:09:32

+0

HTTP 403意味着服務器認爲該請求被要求的東西不應該(禁止)。你能發佈你的服務器日誌嗎? – buruzaemon 2011-05-27 23:10:28

+0

[錯誤] [客戶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

回答

0

現在應當經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); 
      } 
});