customize window closing event message in IE?

大憨熊 提交于 2020-01-05 08:12:18

问题


i am using GWT. on window close we get browser provided message" Are you sure you want to navigate away from this page?". i want to replace the message with my own message. please help me. below is my code.

Window.addWindowClosingHandler(new Window.ClosingHandler() {
            @Override
            public void onWindowClosing(final Window.ClosingEvent closingEvent) {
                                                        closingEvent.setMessage("some message.");
                    }

        });

回答1:


you can not modify the dialog that is opened if you provide a string in the closing event.

The dialog is handled by the browser and can not be customized.



来源:https://stackoverflow.com/questions/7794264/customize-window-closing-event-message-in-ie

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!