How to redirect while prompt is still active?
问题 So say I have the following code: window.prompt('Redirecting'); location.href = '/'; (I know this isn't useful code, but wait one sec) I can't figure out how to make it so that prompt doesn't 'freeze' the whole browser so that the redirect is forced to happen. So that in essence what I want is the prompt to come up and immediately for the page to redirect. (without user pressing anything) I can't seem to find any documentation on how to have a timer on prompt to stop it after a while and/or