SoFunction
Updated on 2025-04-03

Close the browser window and pop up the prompt box and can control its invalidity

Run the following code when the js page is loading
Copy the codeThe code is as follows:

= function(){
return "Unsaved content may be lost";

};

This code will not display the return value under Firefox and IE. This text is displayed under Google browser.

Failure control

Triggering js to run as follows:
Copy the codeThe code is as follows:

= function(){};