我知道这个问题已经被问过很多次了,但是尽管搜索了 google 和 stackoverflow 并进行了各种尝试,但我还是找不到解决问题的方法。
这是我的 JS:
function Redirect(id)
{
window.open("go.php?id=" + id, "_blank");
}
function LinkPop(id)
{
xmlObj = new XMLHttpRequest();
xmlObj.open("GET", "pop.php?id=" + id, false);
xmlObj.send();
document.getElementById(id).style.fontSize = xmlObj.responseText + "px";
document.getElementById(id).title = "Clicked " + (xmlObj.responseText - 18) + " times";
window.setTimeout(function(){Redirect(id);}, 2000);
}
除了 2 秒延迟和打开新页面外,一切正常。如您所见,我尝试了一个没有帮助的关闭。我希望我错过了一些非常基本的东西......
谢谢你的帮助。