0
此測試(用於發送跨域AJAX或不)在Internet Explorer上始終爲false,但它適用於Microsoft Edge。失敗測試同源IE
看起來,<a>
元素不會在IE上填充。
function testSameOrigin(url){
/*
Return true if belongs to the same origin
*/
var loc = window.location,
a = document.createElement('a');
a.href = url;
return a.hostname == loc.hostname &&
a.port == loc.port &&
a.protocol == loc.protocol;
}
我該如何解決這個問題?
感謝您的幫助。
Internet Explorer 12是否存在?最高版本是11.0.28 –
是的,12和13它不是IE,但新的一個微軟邊緣只在Windows 10上。 – Acute
邊緣被完全重寫,它可能等同於Chrome或Firefox lol:P –