Ok so i have figured out how i can exit page with confirmation using window.onbeforeunload but how can i modify box that appears? Like adding css and html not only some text that says "Are you sure you want to exit this page?"
Asked
Active
Viewed 2,467 times
0
-
you cannot change this. Nor you can change any alert statement – asifsid88 Feb 19 '13 at 17:21
2 Answers
2
There is very little you can do with the onbeforeunload
event.
This is to prevent JavaScript from trapping a user.

Halcyon
- 57,230
- 10
- 89
- 128