我想限制外部点击Modal Popup并要求确认退出。 [英] I want to restrict outside click of Modal Popup and ask confirmation to Exit.

查看:80
本文介绍了我想限制外部点击Modal Popup并要求确认退出。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我期待限制外部点击Modal Popup并要求确认退出,任何机构都可以建议我任何API或工作代码实现这一点将非常感激。



非常感谢提前。

Hi Friends,

I am looking forward to restrict outside click of Modal Popup and ask confirmation to Exit, any body can suggest me any API or working code to achieve this will be much appreciated.

Thanks a lot in advance.

推荐答案

我们需要添加关闭Popup的这个函数



We need to add this function which close the Popup

function o() {
                if (confirm("Do you want to Exit?")) {
                a.modal && b(".bModal." + c.data("id")).fadeOut(a.fadeSpeed, function () {
                    b(this).remove()
                });
                c.stop().fadeOut(a.fadeSpeed, function () {
                    null != a.loadUrl && a.contentContainer.empty()
                });
                e.data("bPopup", 0 < e.data("bPopup") - 1 ? e.data("bPopup") - 1 : null);
                a.scrollBar || b("html").css("overflow", "auto");
                b("." + a.closeClass).die("click." + d); b(".bModal." + d).die("click");
                h.unbind("keydown." + d); e.unbind("." + d);
                c.data("bPopup", null);
                b.isFunction(a.onClose) && setTimeout(function () {
                    a.onClose.call(c)
                }, a.fadeSpeed);
                return !1
            }
            else {
                return false;
            }


试试这个:

http://www.aspsnippets.com/Articles/ASPNet-AJAX-ConfirmButtonExtender-with-ModalPopupExtender-Example.aspx [ ^ ]


这篇关于我想限制外部点击Modal Popup并要求确认退出。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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