This what IE warning message looks like:
IE beforeunload message
This is Chrome's warning message
Chrome beforeunload message
This is FireFox warning message (notice the custom message did not show)
FireFox beforeunload message
view source


Add custom message and then try to close browser window: