带CORS的IE9 jQuery AJAX返回“访问被拒绝”
以下适用于IE以外的所有浏览器(我在IE 9中测试)。jQuery.support.cors = true;...
$.ajax(
url + "messages/postMessageReadByPersonEmail",
{
crossDomain: true,
data: {
messageId : messageId,
personEmail : personEmail
},
success: function() {
alert('marked as read');
},
error: function(a,b,c) {
alert('failed');
},
type: 'post'
}
);
我有另一个使用的函数dataType: 'jsonp',但我不需要在这个AJAX调用上返回任何数据。我的最后一招将是返回JSONP中包含的一些乱码,以使其正常工作。
任何想法为什么IE搞砸了没有返回数据的CORS请求?