由於某些原因,只有在IE中(嘗試了7 & 8),jQuery在執行POST請求時應該是GET。如下所示:Internet Explorer將AJAX GET請求視爲POST請求?
function(...) {
/* ... */
$.ajax({
type: 'GET',
dataType: 'script',
url: '/something/' + id,
processData: false,
data: 'old_id=' + oldId,
success:function(data) {
alert(data);
}
});
/* ... */
}
所有瀏覽器正常GET,但IE正在執行POST。爲什麼?
什麼版本的jQuery? – SBUJOLD 2010-05-24 20:59:57
爲什麼你使用'script'作爲dataType? – 2010-05-24 21:23:02