相信有很多朋友,用javascript做一些跳轉(zhuǎn)時(shí),往往發(fā)現(xiàn)refer信息丟失了。為了解決該問題,在IE下,模擬一下點(diǎn)擊事件即可!
function jumpTo (url) {
var isIE = !-[1,];
if (isIE) {
var link = document.createElement("a");
link.href = url;
link.style.display = 'none';
document.body.appendChild(link);
link.click();
} else {
window.location.href = url;
}
}