jquery .ajax ie6 error php 問題

來源:互聯網
上載者:User

在一個項目中使用了jquery架構(1.5.1),並使用了.ajax方法:

$.ajax({url: 'xxx.php',type: 'GET',dataType: 'html',contentType: "text/html; charset=utf-8",cache: false,timeout: 1000,async: false,error: function (XMLHttpRequest, textStatus, errorThrown) {alert(textStatus + ':' + errorThrown.message);},success: function(data) {//...}});

 

IE6下一直出現error 系統錯誤,其他瀏覽器正常。

 

google無數解決方案無果,並且感覺也不應該是jquery問題,畢竟別人比我要厲害得多嘛。

 

結果我更改了我php中的

header('Content-type: text/html;charset= UTF-8');

header('Content-type: text/html;charset=UTF-8');

 

之後IE6正常返回。注意哈,charset= UTF-8中間的空格去掉!IE6真*蛋啊=_=凸

 

PS:jquery 1.4.4 狀態代碼返回也有問題。我這個問題1.4.4狀態代碼返回200,1.5.1返回0。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.