[JS Code] Prompt when the user closes the browser
Thursday on December 22nd, 2005Life
Prompt when the user closes the browser
< script language=" javascript">var timerID = null;var bRefresh = false;function quit(){ if (! bRefresh)event.returnValue= Note: Do you really want to close it!& quot;;}function refresh(){ bRefresh = true; location.reload(true);}timerID = setTimeout("refresh()",10000,"Javascript");</script><body onbeforeunload="quit()">
Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/life/JS-Code-Prompt-when-the-user-closes-the-browser.htm