訪問被拒絕在IE中的https錯誤。同時執行ajax調用(對我的server1)有另一個Ajax調用的響應當我的Ajax調用url在http上。通過實現cors我也能夠在http.Tried JSONP上執行,但是它會執行我的響應,直到它找到另一個ajax調用。怎麼解決 ?下面 是MYSERVER1訪問被拒絕錯誤
alert('aaa');
var xhr2 = new XMLHttpRequest();
xhr2.open('GET', 'http://myserver2.com', true);
xhr2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr2.send();
xhr2.onload = function() {
alert('fff');
var appCreds = xhr2.responseText;
alert(appCreds);
};
alert('xxx');
閱讀此:http://stackoverflow.com/questions/22098259/access-denied-in-ie-10-and-11-when-ajax-target-is-localhost \ – Amy 2014-10-10 07:10:56