在IE中自定义窗口关闭事件消息? [英] customize window closing event message in IE?

查看:97
本文介绍了在IE中自定义窗口关闭事件消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GWT。在窗口关闭时,我们会看到浏览器提供的消息您确定要从此页面导航吗?。我想用我自己的消息来替换消息。请帮帮我。下面是我的代码。

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.");
                    }

        });


推荐答案

如果您无法修改打开的对话框在关闭事件中提供一个字符串。

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.

这篇关于在IE中自定义窗口关闭事件消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆