<script>
function test() {
alert("this should only be called after the browser is fully redirected?");
}
window.location = "http://google.com";
test();
</script>
我要将用户重定向到一个页面,我只想在浏览器完全重定向后执行某些操作(调用函数),但我无法让它工作。我有什么办法可以做到这一点吗?
最佳答案
Is there any way for me to do so?
不。当页面打开 google.com
时,您将无法再控制浏览器窗口。
关于javascript - 仅在浏览器完全重定向后才调用该函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4958790/