尝试以下:
window.open('http://www.google.com','_blank');window.setTimeout(function(){this.close();},1000)
Run Code Online (Sandbox Code Playgroud)
您可以用于location.replace相同的目标:
window.location.replace('https://stackoverflow.com/');
Run Code Online (Sandbox Code Playgroud)
https://developer.mozilla.org/en-US/docs/Web/API/Location/replace