var myWindow;
let urls = ["https://stackoverflow.com", "https://stackexchange.com/"];
let counter = 0;
let openWindow;
function openWin(url) {
openWindow = window.open(url, "_blank");
}
function closeWin(){
openWindow.close();
}
setInterval(function(){
if(openWindow) closeWin();
openWin(urls[counter]);
counter++;
}, 10000)
即使在打开所有网址后,这也会继续打开新标签页。如何防止打开任何其他选项卡然后只打开 url。当我加载此网址时,它会打开 4 个网址,但之后会打开 N 个空白选项卡。
米脂
烙印99
相关分类