コードをコピーします コードは次のとおりです。 >function stoprefresh () <BR>{ <BR>return "保存されていないコンテンツは失われます"; <BR><BR>function Unloadconfirm() <br>{ //ページを離れた後のイベント <br> alert(' ページを離れた後のクリーンアップ...'); <BR><BR> window.onbeforeunload =stoprefresh; //登録が終了する前のイベント<br>window.onunload = Unloadconfirm //登録が終了した後のイベント<br><BR><a href; = "http://www.jb51.net">スクリプト ホーム <BR><br><br>