if(confirm("去看看?")){ window.location.href="/"; }
The above is all about "confirm + if logical judgment-code article".