1

I want to add my custom message in the onbeforeunload function

window.onbeforeunload = function() {                
    if(changes){  
        return 'Are you sure you want to leave without saving changes?'; 
    }               
}

But its showing default message, is there any possibility to overwrite it?

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Sree
  • 11
  • 4
  • 1
    Possible duplicate of [Is it possible to display a custom message in the beforeunload popup?](https://stackoverflow.com/questions/38879742/is-it-possible-to-display-a-custom-message-in-the-beforeunload-popup) | Looks like every browser removed support for custom message. – yuriy636 Jun 30 '17 at 09:11

0 Answers0