Home > front end >  Questions about onbeforeunload play window
Questions about onbeforeunload play window

Time:12-13

First of all, I confess, before Posting a dozen don't knot, today I said outstanding post tips post too much, baidu the knot under the post method, on the computer all married, to give me the answer before the bosses of an apology, and then there is the problem of the post, I want to know is same onbeforeunload event popups, why method for missing data, I just an comparison method is suitable for this project, for bosses to solve for expressing bosses apologies to answer before, this time the score directly poker

CodePudding user response:

Otherwise, is not prompted to save it, write a method to keep the data up, again into the load when

CodePudding user response:

reference 1st floor qq_45713941 response:
, otherwise is not prompted to save it, write a method to keep the data up, again into the load when

The first bomb is immediately pop-up window, pages are not flashing, the second will flash, add topics will disappear

CodePudding user response:

Onbeforeunload event left popup window can only use the default browser prompt box can prevent left page,
The default prompt box style cannot be modified, more can't use div custom prompt box,

CodePudding user response:

reference 3 floor sky waves reply:
onbeforeunload event leave the popup window can only use the default browser tooltip to stop left page,
The default prompt box style cannot be modified, more can't use div custom prompt box,

Check the night information, I give up , who meet again, thanks for answer

CodePudding user response:

Onbeforeunload assignment function can return a prompt string!

If you put the missing data can be stored after operation to complete the
Then read the next page load time storage to restore data can be

There is a simple method of data storage in the sessionstorage refresh the page and still not lost

CodePudding user response:

Visual: problems, should appear in the test problem sets whether all do, need a test problem sets the code

Onbeforeunload=function () {
If (detection problem sets return to true or false==false) {
Alert (" there is a problem not finish ")
}
}
  • Related