12
IE9 jQuery AJAX พร้อม CORS ส่งกลับ "การเข้าถึงถูกปฏิเสธ"
สิ่งต่อไปนี้ใช้ได้กับทุกเบราว์เซอร์ยกเว้น 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 นี้ ทางเลือกสุดท้ายของฉันคือส่งคืน jibberish ที่ห่อด้วย …