I have a requirement of preventing user from closing browser tab when user click on close button of tab.
When a user click on close button of a tab at that time confirmation box should be displayed that prompt user that whether to close or not?
I know it is coming by default of browser but I want my own message to display so I used confirm box. But when users closes then tab is closed.
I just want to know that if user click on cancel then what should I write to keep that tab open?