Home>
There is such an event
window.onbeforeunload= function (e) {
e.returnValue= "";
};
When closing a tab or browser, such a window pops up,
How to transfer your function to save data by clicking on the close button?
Well, that is, since I want to do it is impossible? Save only in localStorage?
Viktor2021-12-24 06:23:51Many browsers do not even allow your message to be sent to this window, so I doubt that you will be able to intercept the result of this prompt.
Object4172021-12-24 08:58:26Related questions
- javascript : Block scrolling by clicking on the arrows
- javascript : How to pass reference from child component to parent?
- html : Block alignment relative to input[range]
- javascript : How to implement block swipe?
- javascript : How to clear canvas? Past images remain
- javascript : How to set an event to beep
- javascript : vue 3 Is it possible to switch the display by specifying v-if as the parent element?
- javascript : Slow scrolling of one block when scrolling the page
- drag &drop in javascript
- javascript : Regex how to parse a string
localStorage, sessionStorage
Object4172021-12-25 03:24:12