Use the window.beforeunload event to execute code before a window or tab is closed. But a cleaner solution is window.sessionStorage.
確定! 回上一頁