onbeforeunload = handler and window.addEventListener('beforeunload', handler) . It is recommended to always set the event.returnValue explicitly, instead of ...
確定! 回上一頁